IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Partial dataset name Processing in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
l_rajendrakumar

New User


Joined: 25 Oct 2006
Posts: 1
Location: Singapore

PostPosted: Mon Jun 23, 2014 2:52 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Jun 23, 2014 3:48 pm
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Mon Jun 23, 2014 4:13 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top