The below JCL you can use to delete GDG base cluster. The interesting point is if you delete the GDG base, automatically it deletes all the versions.
//Step1 EXEC PGM=IDCAMS //SYSIN DD * DELETE 'XXXX.XXXX.XXXX.XXX' GDG FORCE /*
Alternative JCL Example
(or) if we want to delete migrated-GDGS, use the following syntax.
//Step1 EXEC PGM=IDCAMS //SYSIN DD * HDELETE 'XXXX.XXXX.XXXX.XXX' GDG FORCE /*
Notes: To delete VSAM clusters, give CLUSTER in place of GDG.
Popular Parameters you can use with DELETE.
- FORCE: It deletes all clusters in the catalogue.
- NOFORCE: It deletes an empty catalog. If the catalog does have cluster entries, it will not delete.
- PURGE: Even though GDG has retention period, it deletes all entries.
- NOPURGE: When the GDG has retention period, it will not delete the entries.
Notes: With IDCAMS utility we can delete GDG clusters and VSAM clusters.