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 Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts How could i share my personal dataset... James Halley TSO/ISPF 1 Fri Mar 23, 2018 9:41 pm
This topic is locked: you cannot edit posts or make replies. How could i share my personal dataset... samenxia163 TSO/ISPF 1 Fri Mar 09, 2018 12:18 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm

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