Delete fixed-length ESDS
Delete fixed-length ESDS Example
Scenario - Delete ESDS using the IDCAMS utility.
----+----1----+----2----+----3----+----4----+----5----+
//MATEGJD JOB (123),'MTH',CLASS=A,MSGCLASS=A,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*******************************************
//* DELETING ESDS
//*******************************************
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'MATEGJ.TEST.ESDS'
/*
In the above JCL, MATEGJ.TEST.ESDS is the ESDS name that is planned to delete.
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, ESDS successfully got deleted.
Verify the ESDS in 3.4 (Dataset List utility) or any File management tools if required to double-check.
Explaining Example -
In the above example, the MATEGJ.TEST.ESDS (ESDS file) successfully deleted and uncatalogued(space released).
Note! If the file is already deleted and trying to delete the file again, we may receive MAXCC as 08.
So, verify the file once before proceeding for delete.