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

how to copy data set name from a dataset in JCL DD statement


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

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Aug 22, 2007 4:36 pm
Reply with quote

I have requirement to generate DSN dynamically. I want it get from a temporary data set, which has the DSN as the only line.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Aug 22, 2007 5:13 pm
Reply with quote

You can use REXX to generate DSN dynamically in a JCL.

1) Have a template JCL.
2) Copy the temporary dataset to a catalogued dataset
3) read the dataset to get the DSN name.
3) Then read the JCL and substitute the DSN value obtained from the first read thereby creating a new JCL with the DSN name
4) Submit the JCL
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Aug 22, 2007 5:23 pm
Reply with quote

Aaru,
Thank you for your replay.

Actually, previous JCL STEP writes DSNAME to temp dataset. I want to use that DSNAME in the next Step. This DSN has Date in his name, which subject to change every time the job run.

All other way with out using REXX, using only with JCL?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Aug 22, 2007 5:52 pm
Reply with quote

rkprasanth_m wrote:
Actually, previous JCL STEP writes DSNAME to temp dataset. I want to use that DSNAME in the next Step. This DSN has Date in his name, which subject to change every time the job run.

All other way with out using REXX, using only with JCL?
Please define which executable languages and/or utilities you consider to be "JCL"......
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 22, 2007 5:57 pm
Reply with quote

Well, you obviously need to read the temp dataset to get the name of the dataset that you need to dynamically allocate.

But why not use the job passing the DSN to allocate it for you, rather than write it out, read it in, and THEN create the dataset ???
Back to top
View user's profile Send private message
rkprasanth_m

New User


Joined: 22 Jun 2006
Posts: 44

PostPosted: Wed Aug 22, 2007 8:52 pm
Reply with quote

ThankYou Expat.

Well, I have a program which generates a dataset name and writes it to a temp dataset. I want to create the dataset with the name in the temp dataset.

We can't have it like that?. How could we create datasets which has dynamic names, other then writing JCL code to internal reader thru COBOL program.(DSNAME will be known at the time of execution, we can't hard code into jcl).

Could someone assist me please.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 22, 2007 9:32 pm
Reply with quote

Then you must read the file and get the dsn and then use the dynamic allocation routines of what ever language your second program is written in.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Aug 22, 2007 10:07 pm
Reply with quote

rkprasanth_m
If your question is to generate some kind of dynamic dataset names with date/time parameters.
Then refer to FAQ topics no longer eligible for discussion in any of these Forums:
ibmmainframes.com/viewtopic.php?t=20820
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 Store the data for fixed length COBOL Programming 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top