Previous Topic: Specify Records to Back Up

Next Topic: Compress Files

Delete the Contents of Files

Use the RESET statement to delete the contents of managed data sets. Do this by providing the ddname of the file that should be emptied on the OUTFILE parameter of the RESET statement, which is described in the Reference Guide. This ddname must match the ddname on the ADDFILE command.

For example, to delete the contents of FILE1, specify a RESET statement as follows:

//        EXEC  PGM=LDMAMS
//SSN$xxxx DD    DUMMY
//SYSPRINT DD    SYSOUT=A
//SYSIN   DD    *
  RESET   OUTFILE(FILE1)
//*

Note: A file can be reset only if it was defined with the REUSE option of the DEFINE CLUSTER control statement of the IDCAMS utility.