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
 
listcat jcl GDG with relative genration number

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

New User


Joined: 10 Feb 2008
Posts: 19
Location: bhuneswar

PostPosted: Sat Jul 11, 2015 6:27 pm    Post subject: listcat jcl GDG with relative genration number
Reply with quote

Hi

I need to know whether a previous gdg generation exist or not using relative generation number for example test.gdgdatasrt(-4) ,

//JS10 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT LEVEL('TEST.GDG.DATASET(-4)')
/*

I am receiving the message as "(' DOES NOT ADHERE TO RESTRICTIONS

Thanks for your help in advance

Regards
Sumit
Back to top
View user's profile Send private message

sumitmalik29
Warnings : 1

New User


Joined: 10 Feb 2008
Posts: 19
Location: bhuneswar

PostPosted: Sat Jul 11, 2015 6:41 pm    Post subject:
Reply with quote

Hi

I searched another post
http://www.ibmmainframes.com/about48158.html
and If i have understood correctly we cannot use relative parameter.

It would be great if we have some other aternative preferably JCL

Thanks
Sumit
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 11, 2015 7:52 pm    Post subject:
Reply with quote

Why not use LISTCAT LEVEL(TEST.GDG.DATASET), put the IDCAMS output into a data set, and scan that data set for what you want to know?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 658
Location: Whitby, ON, Canada

PostPosted: Mon Jul 13, 2015 5:40 pm    Post subject:
Reply with quote

Another approach is BPXWDYN:
Code:
/* rexx  */                                                     
  x = BPXWDYN("ALLOC DD(QQQ) DA('xxxx.yyyyyy.testGDG(-4)') " ,
      "SHR REUSE GDGNT")                                       
  say x                                                         
  DO I = 1 TO S99MSG.0                                         
    SAY "message = " S99MSG.I                                   
  END                                                           

If the allocation fails, then the data set is not in the catalog (see S99MSG.i to be sure).
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 Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts how to mask the phone number kumarinfy DB2 4 Mon Apr 03, 2017 5:23 pm

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