Every time when i give prep to my JCL ‘s i get errors saying that the GDG’s are not built for the datasets.So i go to fileaid everytime to create GDG ‘s . Now i wan a REXX which will have all the dataset names in it and on execution creates GDG ‘s for all tjhose datasets.
Hope u understand it. Thanks
One can define GDG base using IDCAMS. forget REXX for this one. Just use JCL. add something like this to the front of your job:
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG (NAME(name of first dataset) LIMIT(3) NOEMPTY SCRATCH)
DEFINE GDG (NAME(name of 2nd dataset) LIMIT(3) NOEMPTY SCRATCH)
DEFINE GDG (NAME(name of another one ) LIMIT(3) NOEMPTY SCRATCH)
But the obvious question is who is deleting your GDG definitions? Why aren’t they still there? I think you might want to go visit with your storage administrator. Perhaps you are not defining them correctly or placing them improperly or naming them without following certains standards and they are being cleaned up. Datasets just don’t go away, usually. You can’t live in a world where your stuff just disappears. Talk to your SMS or DASD guy to find out what is happening to your GDGs.