JCL Temp data set with disp ‘KEEP’ or ‘CATLG’

If the DISP parameter for a temporary data set specifies KEEP or CATLG, the system changes the disposition to PASS and deletes the data set at job termination.

However, the system does not change the disposition for a data set when all of the following are true:

  • The data set resides on tape
  • The data set is new
  • The data set is not named in a DSNAME parameter
  • The status in the DISP parameter is OLD or SHR
  • The UNIT parameter contains DEFER

In this case, the system deletes the data set at job termination but tells the operator to keep the volume for the data set.


JCL Quiz:  Start your Quiz here


Examples

//TEMPDS1  DD  DSNAME=&&MYDS,DISP=NEW,UNIT=SYSDA,
//              SPACE=(CYL,20)

//TEMPDS2  DD  DSNAME=&&DSA,DISP=(NEW,PASS),UNIT=3380,
//             SPACE=(TRK,15)

//TEMPSMS  DD  DSNAME=&&ABC,DATACLAS=DCLAS2,STORCLAS=TEMP1,DISP=NEW

(Ref: IBM on JCL)
Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.