Deleting data sets based on JCL disposition and catalog status

SEQQSAMP member EQQDELDI contains JCL to run the sample program, EQQDELDS, that you can use to delete data sets based on the disposition specified in the JCL and the current status of the data set in the catalog. EQQDELDS is not a function of IBM Tivoli Workload Scheduler for z/OS. The program is supported by IBM Tivoli Workload Scheduler for z/OS development to help customers who require this function and who do not want to change existing application JCL. To run this program, modify the JCL statements identified by the characters <==== to meet your installation standards. EQQDELDS deletes any data set that has a disposition of (NEW,CATLG), or (NEW,KEEP) for SMS, if the data set is already present in the catalog. It optionally handles passed data sets.

Note:
Data sets are not deleted if they are referenced in a previous step with DISP different from NEW, unless DELLOGIC is set to 2. Data sets defined with indirect or symbolic VOLSER are not deleted by IDCAMS. DELETE only uncatalogs the data set; it does not scratch the data set for the SYSRES volume, even if SCRATCH is specified.

You can use EQQDELDS to avoid not catlgd 2 situations. EQQDELDS cannot run concurrently with subsequent steps of the job in which it is inserted. Therefore, if Smartbatch is active, define EQQDELDS with ACTION=BYPASS in the Smartbatch user control facility.

EQQDELDS supports these types of delete processing:

EQQDELDS logs all actions performed in text lines written to the SYSPRINT DD.

A nonzero return code from IDCAMS or ARCHDEL causes EQQDELDS to end.

You can use the EQQUX001 exit to automatically add an EQQDELDS step to all jobs submitted by IBM Tivoli Workload Scheduler for z/OS.

See also section Limitation on the number of job steps in the Restart and cleanup chapter of IBM® Tivoli Workload Scheduler for z/OS Managing the Workload.