I'm in a need to copy all the generations of GDG using REXX code.
NO and NO and NO ...
You need to copy all the generations of a GDG FULL STOP
using rexx code is just a silly requirement , nobody here will waste time on providing advice on it
did You / Your support ever hear of DFDSS ???