I have a requirement where in i need to count the number of pages of a report file which is the latest generation of a GDG in an eazy trieve module. But if the GDG has no generations, my program throws a JCL error 'GDG XXXX contaons no generatiopns'. Is there any method to overcome this isssue? If the GDG has no generations the page count for that report should be zero.
There are various ways to check if a base has associated generations. This was recently discussed on the forum not more than two or three weeks ago.
I understand that we can get the GDG base/assosiation details by scaning the listcat utilities output.
But my next step is to count the number of pages in the last generation of GDG, which i am doing using an eazytrievw module. My idea was to compare the last modified date of a GDG(which i got by scanning listcat output) with the system date and if they are not equal i move 0 to the page count variable , and if the dates are same i will count the number of pages in the latest generation. But in both cases i need to mentions the gdg.xxx.gen(0) as the INFILE for the eazytrieve module, which throws a JCL error saying GDG has no generations. Please help me if there is any idea to solve this..