|
Entire document Available as PDF |
The DELETE cataloged procedure deletes a specified cataloged data set. If the data set exists at the time you run DELETE, then it is deleted (scratched) and uncataloged. If it does not exist at the time you run
DELETE, an error message is printed, and the rest of your job runs normally. DELETE always returns condition code 0000, whether or not it finds a data set with the specified name.
If you need to delete a member of a partitioned data set (PDS) rather then the whole PDS, use the IUTPROGM utility described in this document.
IUTPROGM is a locally written program that is no longer supported. We recommend that IBM's IEHPROGM or IDCAMS utility programs be used instead.
Figure 5 shows an easy job setup to delete a data set using DELETE.
To delete a data set named UF.userid.DATA.OLD, use the setup in Figure 2.
Figure 5. Using DELETE to Delete a Data Set
//jobname JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines /*ROUTE PRINT node.location // EXEC DELETE,DSN='UF.userid.DATA.OLD'
Once DELETE is run on a data set, that data set is gone. Data set storage can be expensive, however, so if you really don't need a data set any
more, use DELETE to get rid of it.