View previous topic :: View next topic
|
Author |
Message |
kris_chennai
New User
Joined: 19 Dec 2005 Posts: 7 Location: Chennai
|
|
|
|
Hi,
Could you help me? the requirement is
// SET DATASET=1205
// SET PDATASET=1105
//I1MW20FL DD DSN=TST.CTS.TEST1.M&DATASET
if for example data set M1205 is available we need to take the data set processing else we need to take previous month processing (PDATASET)
How do I check the data set is available for processing @ run time.. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
You can do this using a constructed jcl(that can be also a proc to reduce the maintenance) that exec different blocks:
i.e.
Code: |
//* NEW BLOCK (GEN)
//STEP010I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(MY GEN FILE) ALL
//* MY PROGRAM WITH MY INPUT FILE (GEN)
//STEP010P EXEC PGM=IEFBR14,COND=(0,NE,STEP010I)
//* NEW BLOCK (FEB)
//STEP020I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(MY FEB FILE) ALL
//* MY PROGRAM WITH MY INPUT FILE (FEB)
//STEP020P EXEC PGM=IEFBR14,COND=(0,NE,STEP020I) |
or you can do this using a single Rexx program to do all in a step.
Rember that the SET statement will work only in JCL statement and not in instream parameters.
I hope in this help.
P.S.= if you search in this forum you will find many other solution. |
|
Back to top |
|
|
kris_chennai
New User
Joined: 19 Dec 2005 Posts: 7 Location: Chennai
|
|
|
|
Hi LISTCAST entry should be passed from JCL. How can I do that. The entry should not be static.. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
If you submit the jcl above from your userid you will get some error because SET statement allow substitution only in JCL statement and not in instream parameter or DD DATA.
The only way to change the value before the submit is from a scheduler or a trick.
I hope in this help. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Kris,
One way to accomplish this is to use the INTRDR. Do a search here. There is a lot of info available. |
|
Back to top |
|
|
|