View previous topic :: View next topic
|
Author |
Message |
rdasari123
New User
Joined: 28 Aug 2008 Posts: 8 Location: Wilson, NC
|
|
|
|
Hi,
I am here with unusual situation.
How to create a JCL where DD name is a variable, I mean the dataset name changes from execution to execution.
Ex:
TEMP1 DD DSN=D555.AP.DDNAME, DISP=SHR
D555.AP.DDNAME will contain the dataset name to be processed.
Let me know if you need additional information.
Thanks,
Ram. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use an INCLUDE statement or a SET statement maybe? |
|
Back to top |
|
|
rdasari123
New User
Joined: 28 Aug 2008 Posts: 8 Location: Wilson, NC
|
|
|
|
Thanks for prompt resp.
INCLUDE statment is member of PDS, it wont, work.
in my case the Dataset name is in a file, it gets update from on-line.
It means the file to be processed is passed to JCL from CICS. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Do you want the DD name as variable, the program processing the file would have to be able to handle a variable DD name, or do you want the DSN to be variable? |
|
Back to top |
|
|
rdasari123
New User
Joined: 28 Aug 2008 Posts: 8 Location: Wilson, NC
|
|
|
|
Thanks for your resp.
I want "the DSN to be variable".
Ex:
Say the content of D555.AP.DDAME is "J555.AP.GDG.G01V0022"
in JCL
TEMP DD DSN=D555.AP.DDAME, DISP=SHR
Then TEMP should refer to J555.AP.GDG.G01V0022, in JCL.
Thanks again. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
There is a big difference between a variable dd name and a variable dsn name.
Code: |
//temp dd dsn=&temp1,disp=shr
|
Then when CICS submits the job just have include the variable in the job stream
Code: |
// set temp1=d555.ap.ddame |
|
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
You could do something with SORT where a new JOB is created from static JCL statements and the dataset name in file D55.AP.DDNAME and then submitted to INTRDR. |
|
Back to top |
|
|
rdasari123
New User
Joined: 28 Aug 2008 Posts: 8 Location: Wilson, NC
|
|
|
|
CICS is not going to submit the job, its going to update a dataset with data set name. The dataset has to be processed in JCL.
Craq Giegerich wrote: |
There is a big difference between a variable dd name and a variable dsn name.
Code: |
//temp dd dsn=&temp1,disp=shr
|
Then when CICS submits the job just have include the variable in the job stream
Code: |
// set temp1=d555.ap.ddame |
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Ram, I think you've been presented with all of the viable options. You'll have to use an INCLUDE and/or SET, programatically build and submit the JCL, or you'll have to use a program to read the content of 'D555.AP.DDAME' and use a dynamic allocation routine (i.e. BPXWDYN or TSO ALLOCATE) to process the imbedded dataset name. |
|
Back to top |
|
|
|