this is helpful when you dont know how many generations there are(of course you can check 3.4 in the command line) but lets say you in a JCL you are creating you want to copy all the generation without the hassle of repeating the dd statement.
//step001 exec pgm=sort
//sortin dd dsn=<GDG base here>, disp=shr *may also be old or whatever you want
//sortout dd dsn=<your output dataset>,
// disp=(new,catlg,delete)
// lrecl=100,
// recfm=fb
//sysin dd *
sort fields=copy
*
//*
What is a GDG base?
You probably have seen GDGs before. They look like the ones below.
NEURON.GENERAT.DATA.GROUP <-- This is the GDG base
NEURON.GENERAT.DATA.GROUP.G0001V00
NEURON.GENERAT.DATA.GROUP.G0002V00
NEURON.GENERAT.DATA.GROUP.G0003V00
NEURON.GENERAT.DATA.GROUP.G0004V00
by the way, GDG means Generation Data Groups