Hi
Do you need to recover the actual names of the existing generations or do you just want to process all the existing generations no matter the name, in a job step?
If it's the latter and IIRC (a very big if) just specifying the GDG base name in the DSN subparameter should be enough.
//DD1 DD DISP=OLD,DSN=MY.GDG? All generations LIFO
instead of
//DD1 DD DISP=OLD,DSN=MY.GDG.G00010V00
//??????? DD DISP=OLD,DSN=MY.GDG.G00011V00
or
//DD1 DD DISP=OLD,DSN=MY.GDG(-1)
//??????? DD DISP=OLD,DSN=MY.GDG.(0)
John
?