CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs

DOCWEB Logo Entire document
Available as PDF


Table of Contents

DELETE
JCL
Example

DELETE

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.

2/26/2005 Update

IUTPROGM is a locally written program that is no longer supported. We recommend that IBM's IEHPROGM or IDCAMS utility programs be used instead.

JCL

Figure 5 shows an easy job setup to delete a data set using DELETE.

Figure 4. JCL for Using the DELETE Procedure

//jobname JOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines
/*ROUTE PRINT node.location 
// EXEC DELETE,DSN='your.dataset.name'

Parameters

The DELETE procedure has one required parameter, DSN. Use this parameter to specify the name of the data set you want to delete. The name must be in single quotes.

Example

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'

Note

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.

CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs