Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to find whether a Dataset exists or not using JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
pralaksh

New User


Joined: 06 Jul 2005
Posts: 1
Location: India

PostPosted: Wed Jul 06, 2005 8:46 am    Post subject: How to find whether a Dataset exists or not using JCL
Reply with quote

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
View user's profile Send private message

parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed Jul 06, 2005 11:02 am    Post subject:
Reply with quote

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
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us