IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find Number of generations existing under a GDG


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohit510

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Thu Jan 29, 2009 5:29 pm
Reply with quote

HI,
Is there any utility available to find number of generations existing under a GDG Base.
Is there any other way around to find number of generations existing under a GDG Base.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 29, 2009 5:31 pm
Reply with quote

IDCAMS LISTCAT, i.e.

LISTCAT ENT('GDGBASE') ALL
Back to top
View user's profile Send private message
rohit510

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Thu Jan 29, 2009 5:42 pm
Reply with quote

Hi ,
Thanks for the quick reply

Shls this statement be passed in the SYSIN statement
Back to top
View user's profile Send private message
rohit510

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Thu Jan 29, 2009 5:56 pm
Reply with quote

My requirement is to find the number of generations and store it in a variable.How can i do this?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 29, 2009 7:19 pm
Reply with quote

Write IDCAMS SYSPRINT to a file and use a program to extract the required information.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jan 30, 2009 3:06 pm
Reply with quote

Hi,

I've been using this EXEC, check if it works for your requirement:
Code:
PARSE UPPER ARG GDGBASE                                       
                                                             
/*trace i*/                                                   
  gdg_limit = ""                                             
                                                             
  x = OUTTRAP("LISTC.",99)                                   
  ADDRESS TSO "LISTC ENTRIES("gdgbase") GDG ALL"             
  listc_rc = rc                                               
  x = OUTTRAP("OFF")                                         
                                                             
  IF listc_rc = 0 THEN                                       
     DO ctr = 1 TO listc.0                                   
        IF POS("LIMIT",listc.ctr) > 0 THEN                   
           DO                                                 
             limit_line = TRANSLATE(listc.ctr," ","-")       
             PARSE var limit_line literal gdg_limit remainder
             LEAVE                                           
           END                                               
     END                                                     
                                                             
  IF DATATYPE(gdg_limit) = "NUM" THEN                                 
     SAY "Max Number of Generations allowed for" gdgbase "=" gdg_limit
  ELSE                                                                 
     SAY gdgbase "is not a valid GDG Base"                             
                                                                       
EXIT(0)                                                               
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top