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 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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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