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
 

 

How to find Number of generations existing under a GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to find Number of generations existing under a GDG
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

Moderator Team Head


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

PostPosted: Thu Jan 29, 2009 5:31 pm    Post subject: Reply to: How to find Number of generations existing under a
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 29, 2009 7:19 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Jan 30, 2009 3:06 pm    Post subject:
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    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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm


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