Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to copy data set name from a dataset in JCL DD statement
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: 1288
Location: Chennai, India

PostPosted: Wed Aug 22, 2007 5:13 pm    Post subject: Reply to: how to copy data set name from a dataset in JCL DD
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    Post subject: Reply to: how to copy data set name from a dataset in JCL DD
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: 2150
Location: At my coffee table

PostPosted: Wed Aug 22, 2007 5:52 pm    Post subject: Re: Reply to: how to copy data set name from a dataset in JC
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 22, 2007 5:57 pm    Post subject:
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    Post subject: Reply to: how to copy data set name from a dataset in JCL DD
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 22, 2007 9:32 pm    Post subject:
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    Post subject:
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:
http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 6 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us