Delete a Key-Sequenced VSAM Cluster in a Catalog: Example 6
In this example, a key-sequenced cluster is deleted. Alternate
indexes and paths related to the key-sequenced cluster are deleted
automatically by access method services. Access method services will
dynamically allocate the key-sequenced data set so that the data can
be overwritten (as specified by the ERASE option).
//DELET1 JOB ...
//STEP1 EXEC PGM=IDCAMS
//DD1 DD VOL=SER=VSER02,UNIT=3380,DISP=OLD,
// DSNAME=EXAMPLE.KSDS01
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DELETE -
EXAMPLE.KSDS1 -
FILE(DD1)
PURGE -
ERASE -
CATALOG(GGGUCAT2)
/*
The DELETE command deletes the key-sequenced VSAM cluster from
the GGGUCAT2 catalog. Its parameters are:
- EXAMPLE.KSDS1, which is a key-sequenced VSAM cluster, is the entryname of the object being deleted.
- FILE is not required but improves performance if specified.
- PURGE specifies that the cluster is to be deleted regardless of its retention period or date.
- ERASE specifies that the cluster's data component be overwritten with binary zeros. If the NOERASE attribute was specified when the cluster was defined or altered, this is ignored.
- CATALOG identifies the catalog, GGGUCAT2, containing the cluster's entries.