I think if you are listing a level of data sets with LISTC you use 
LISTC LEVEL(dataset name)  Then it should produce an RC=0

I don't have a system to check this, but I think it is correct.

Lizette Koehler

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of George, William (DHS-ITSD)
Sent: Wednesday, June 01, 2005 11:04 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: GDG gen existence check via JCL

I'm attempting to create a JCL step to check the existence of at least
one dataset generation attached to a GDG base name.
I'm aware I can use IDCAMS to check a dataset's existence via
//STEP001  EXEC PGM=IDCAMS                        
//SYSIN    DD *                                   
   LISTCAT ENTRIES(DATASET.NAME.FLATFILE)    
//*                                        
//   IF (STEP001.RC NE 0 OR ABEND) THEN    ....

But IDCAMS doesn't recognize relative generations so this method doesn't
work for a GDG.
That is,        //STEP001  EXEC PGM=IDCAMS                        
//SYSIN    DD *                                   
   LISTCAT ENTRIES(DATASET.NAME.GDGBASE(0) )    
//*                                        
//   IF (STEP001.RC NE 0 OR ABEND) THEN    ....

Is there some means to do this without creating a REXX exec to process
the check?
I'm drawing a blank.

Thanks
Bill


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to