View previous topic :: View next topic
|
Author |
Message |
pralaksh
New User
Joined: 06 Jul 2005 Posts: 1 Location: India
|
|
|
|
Hi All,
Can anyone please let me know the JCL utility to find a dataset exists or not.I think we have a utility that gives a RC of 1 if the DS exists and a zero if it does not.It will be great if anyone can help me out with this.
Thanks,
Lakshmi Narasimhan |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
I think LISTC utility(If awailable on your shop) can be used to check whether the dataset exists.
Example pseudo code can look like this.
//EXIST1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTC ENT('SOME.DATASET.NAME')
// IF RC = 0 THEN
//* executes when dataset exists
??. more JCL here ???.
// ELSE
//* executes when dataset doesn't exist
??. more JCL here ???.
// ENDIF
Corrections welcome. |
|
Back to top |
|
|
|