JCL DD EXPDT

JCL – DD DSNAME JCL – DD KEYLEN

Advertisements


EXPDT used to specify the expiration date for a new data set.

On or after the date specified, the dataset get deleted or overwritten by another one.

EXPDT does same as RETPD parameter.

Code EXPDT parameter when it actually needed.

EXPDT is an optional parameter.


Note:

Do not specify the expiration date for temporary dataset.


Syntax:

EXPDT= {yyddd   }
       {yyyy/ddd}

EXPDT=yyddd Specifies an expiration date for the data set.

This form of expiration supports two-digit year number yy and three digit date ddd.

Two digit year yy from 00 through 99.

Three digit days ddd from 001 through 365 for normal years and 001 through 366 for leap years.

Note:

Expiration dates of 99365 and 99366 are considered “never-scratch” dates. Data sets with these expiration dates are not deleted or written over and simply exist for ever.


EXPDT=yyyy/ddd Specifies an expiration date for the data set.

This form of the expiration date specifies a four-digit year number yyyy and three digit date ddd.

Four digit year yyyy from 1900 through 2155.

three-digit day number ddd from 001 through 365 for a non-leap year date and from 001 through 366 for a leap year date.

Note:

Expiration dates of 1999/365 and 1999/366 are considered “never-scratch” dates. Data sets with these expiration dates are not deleted or written over and simply exist for ever.

For expiration dates of January 1, 2000 and later, you MUST use the form EXPDT=yyyy/ddd.



Example 1:

//DD01  DD  DSNAME=MTH.DATA,DISP=(NEW,KEEP),EXPDT=2019/027,
//          UNIT=SYSDA,SPACE=(TRK,(1,1))

The data set is not eligible for being deleted or written over until January 27, 2019.


Example 2:

//DD01  DD  DSNAME=MTH.DATA,DATACLAS=DCLAS07,DISP=(NEW,KEEP),
//            EXPDT=2018/027

The expiration date of January 27, 2018 overrides the expiration date defined in the data class for the data set.


JCL – DD DSNAME JCL – DD KEYLEN

Advertisements