Delete a Non-VSAM Data Set's Entry: Example 4
In this example, a non-VSAM data set's entry is deleted. The SCRATCH
parameter is the default. A FILE parameter and its associated DD statement
are provided to allocate the data set's volume. In this example, dynamic
allocation is not used to provide catalog or volume allocation. This
example applies only to non-VSAM data sets that have catalog entries.
//DELET4 JOB ...
//STEP1 EXEC PGM=IDCAMS
//DD1 DD VOL=SER=VSER02,UNIT=3380,DISP=OLD,
// DSNAME=EXAMPLE.NONVSAM
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DELETE -
EXAMPLE.NONVSAM -
FILE (DD1) -
PURGE -
CATALOG(USERCAT4)
/*
The DELETE command deletes the non-VSAM data set EXAMPLE.NONVSAM.
Its parameters are:
- EXAMPLE.NONVSAM is the entryname of the object to be deleted.
- FILE specifies the ddname of a DD statement that describes the non-VSAM data set's volume and causes it to be mounted. When the data set is deleted, its DSCB entry in the volume's VTOC is removed.
- PURGE specifies that the non-VSAM data set's retention period or date is to be ignored.
- CATALOG identifies the catalog that contains the entries, USERCAT4.