Process All Generations
The JCL executes a PROC. It has an input file as a GDG. I need to determine in the first step how many generations are there in this input gdg. How do I do that? I want it to process as follows:
- find how many generations of input gdg
- depending upon number of generations access (process) one by one and then delete. Take next version process it and delete and so on
Answer: The number of generations that a GDG will have is defined when the GDG is defined. Since you want to process all generations anyway why not just process the whole GDG in one go rather than trying to access the individual files? Step one - process the GDG, step two delete all generations.
This article written by Stephen Chapman, Felgall Pty Ltd.