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
 
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: 4650
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: 8657
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 & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts PARSE GDG name to separate generation... Abid Hasan SYNCSORT 2 Sun Feb 11, 2018 3:40 pm

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