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
 

 

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: 7904
Location: Bellevue, IA

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: 641
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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts CPU time Vs Number of records Nileshkul JCL & VSAM 5 Mon May 09, 2016 4:05 pm
No new posts Syntax to check the first 4 digits of... kshirabdhi DFSORT/ICETOOL 10 Tue May 03, 2016 12:21 pm


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