Read System Catalog to get GDG Information?

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Jahan M
New Member
Posts: 3
Joined: Tue Aug 12, 2014 7:30 pm

Read System Catalog to get GDG Information?

Post by Jahan M »

Hi,

I would like to do something which is similar to TSO/ISPF 3.4 on the GDG base. Once you do that, the most recent generation's absolute numbers can be seen. I tried to used IDCAMS for it but it does not seem to return information in a format that can easily understood by a program.

So I want to have a JCL on mainframe which can retrieve a particular GDG's latest relative generation numbers from the catalog . And then I'll look at this result to get the relative generation numbers.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 824
Joined: Wed Sep 11, 2013 3:57 pm

Re: Read System Catalog to get GDG Information?

Post by enrico-sorichetti »

unfortunately Your question is clear as mud!
the catalog contains the absolute generation number, not the relative(0,-1,-2,...-n)

if You need to dynamically allocate a generation then BPXWDYN is the way to go ( it understands the relative gdg numbering )
https://www-01.ibm.com/support/knowledg ... 0/wdyn.htm

and ... YES, BPXWDYN is callable from a cobol program
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Read System Catalog to get GDG Information?

Post by nicc »

It is easy enough to manipulate a LISTCAT listing with the programming language of your choice. Using the right parameters to LISTCAT to restrict the output to that with the minimum 'other information' will help.
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”