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: 8410
Location: Dubuque, Iowa, 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: 671
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 How to count the number of times key ... vnktrrd DFSORT/ICETOOL 14 Thu Nov 15, 2018 9:19 pm
No new posts Accessing control blocks to retrieve ... menonkiran COBOL Programming 5 Wed Nov 14, 2018 9:08 pm
No new posts Get line number where cursor is from ... satish.ms10 CLIST & REXX 3 Wed Oct 24, 2018 12:23 am
No new posts Number of Packages required for stati... manojthokala7 DB2 4 Mon Sep 17, 2018 7:14 pm
No new posts Add Comma to each record until find t... naveensrimf DFSORT/ICETOOL 6 Sat Jul 28, 2018 12:25 am

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