|
DELTDS cataloged procedure deletes [and uncatalogs] existing data set using MVS Job Scheduler (IEFBR14 is a "do-nothing" dummy system program). When a cataloged data set gets deleted, it also gets uncataloged by the system. Warning! DELTDS procedure is potentially destructive and should be used with a caution and only after safe experimenting as it is described below. If you don't have clear understanding what to expect from DELTDS, i.e. if you are not sure how data set deletion works under MVS, please do not use DELTDS procedure at all. Following are parameters of the DELTDS cataloged procedure:
Disposition MOD takes care of the case when data set to be deleted doesn't exist — it will be both created and deleted by this job step thus avoiding the JCL error. SPACE and DCB parameters are necessary for this creation and their values are insignificant, provided they are syntactically valid. Values chosen in DELTDS always provide this validity. This simple cataloged procedure is an essential building block for other procedures and jobs — creating data sets by JCL DD operator is a common task. Attempt to create a cataloged data set with the name already existing in the catalog results in a JCL error. So it is a standard practice to delete a data set[s] just a step before its creation for the data output. DELTDS cataloged procedure provides a short one-line operator to simplify this task. |
//****** Delete (and Uncatalog) Disk Data Set -- 05/31/1982–09/17/1997
//* Copyright (C) 1982–1997 by Vladimir Veytsel www.davar.net
//*
//DELTDS PROC S=, - Data set full name
// V= - Volume of the data set (Default: cataloged)
//*
//IEFBR14 EXEC PGM=IEFBR14
//SYSUT DD UNIT=SYSALLDA,VOL=SER=&V,SPACE=(TRK,0),
// DSN=&S,
// DCB=DSORG=PS,DISP=(MOD,DELETE)
//DEVVLADT JOB CLASS=T,MSGCLASS=H,NOTIFY=&SYSUID TYPRUN=SCAN
//PROC JCLLIB ORDER=&SYSUID..PGMR.PROC
//TEST EXEC DELTDS,S=DEVVLAD.TEST.JOB
//
|
IGD103I SMS ALLOCATED TO DDNAME SYSUT
IEF142I DEVVLADT IEFBR14 TEST - STEP WAS EXECUTED - COND CODE 0000
IGD105I DEVVLAD.TEST.JOB DELETED, DDNAME=SYSUT
|
IGD101I SMS ALLOCATED TO DDNAME (SYSUT )
DSN (DEVVLAD.TEST.JOB )
STORCLAS (STD) MGMTCLAS (X010Y185) DATACLAS (SMALL)
VOL SER NOS= TST027
IEF142I DEVVLADT IEFBR14 TEST - STEP WAS EXECUTED - COND CODE 0000
IGD105I DEVVLAD.TEST.JOB DELETED, DDNAME=SYSUT
|
IGD101I SMS ALLOCATED TO DDNAME (SYSUT )
DSN (SYS97215.T150623.RA000.DEVVLADT.R0659308 )
STORCLAS (STD) MGMTCLAS ( ) DATACLAS (SMALL)
VOL SER NOS= VIO
IEF142I DEVUVOVT IEFBR14 TEST - STEP WAS EXECUTED - COND CODE 0000
IGD105I SYS97215.T150623.RA000.DEVVLADT.R0659308 DELETED, DDNAME=SYSUT
|