IDCAMS Utility can be used to create a GDG base, as well as deleting an existing base.
Define a GDG base:
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE GENERATIONDATAGROUP (NAME(gdg.base) - NOEMPTY SCRATCH LIMIT(4)) /*
Delete/Purge a GDG base and all the included files:
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE gdg.base GDG FORCE /*
Delete/Purge a GDG base (base only, there should not be any versions):
//STEP01 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE gdg.base PURGE /*
Learn more on GDG bases
Worked perfectly …. Thanks!
Great Help, Works perfectly, thank you very much for the contribution.
Need to delete all generations of the gdg prior to deletion of the base. This is the reason for Kaniska’s error, encountered it as well. π
Thanks for the code!