Page 1 of 1

Read System Catalog to get GDG Information?

Posted: Tue Feb 23, 2016 1:50 pm
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.

Re: Read System Catalog to get GDG Information?

Posted: Tue Feb 23, 2016 1:56 pm
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

Re: Read System Catalog to get GDG Information?

Posted: Tue Feb 23, 2016 4:30 pm
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.