View previous topic :: View next topic
|
Author |
Message |
l_rajendrakumar
New User
Joined: 25 Oct 2006 Posts: 1 Location: Singapore
|
|
|
|
I have a requirement where I have a file name which changes most of the times from my previous JCL (other application team). I need to process that (may be COPY for example into another file), can you please suggest.
Let me say, the file name is AAAA.BBBB.????.CCCC.DDDD
the value of ???? can be X001/X0002/X0003/X004...X100.
We are not sure with which value it comes, so is there any logic in JCL that we can check which ever value the file exists we can take and process it?
Note: At any point of time there will be only file, I mean ???? can have only X001/X002/X003/....X100 only one of these values.
Thanks! |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
There is no facility in JCL that does what you seem to want to do. I recommend a step running Rexx to get the DSN and write it to a tiny data set, and then read the DSN in the program and use BPXWDYN to allocate the target data set. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
l_rajendrakumar wrote: |
Hi All,
I am having a requirement where I have a file name which changes most of the times from my previous JCL(other application team). I need to process that(may be COPY for example into another file), can you please suggest.
Let me say, the file name is AAAA.BBBB.????.CCCC.DDDD
the value of ???? can be X001/X0002/X0003/X004...X100.
We are not sure with which value it comes, so is there any logic in JCL that we can check which ever value the file exists we can take and process it?
Note: At any point of time there will be only file, I mean ???? can have only X001/X002/X003/....X100 only one of these values.
Thanks! |
No. Only complete data set names can be be specified in JCL. You can use symbol substitution in data set names specified in JCL.. See the chapters "Using System Symbols and JCL symbols" and "SET Statement" in the MVS JCL Reference manual for your z/OS release.
By the way, in z/OS a “file” is the data on magnetic tape between the beginning of the tape and a “file mark”, or two “file marks.” Period. End of story. There are no “files” on disk storage. z/OS uses “data sets.” A “file” in toy and baby systems is an unstructured stream of bytes, compared to a “data set,” which has a structure. |
|
Back to top |
|
|
|