DD EXPDT Parameter


Note! EXPDT parameter is required only when we are creating a dataset.

The EXPDT parameter stands for "expiration date" and is used to set the expiration date while creating a new dataset. Once the expiration date is reached, the system automatically deletes the dataset without any user involvement.

EXPDT and RETPD parameter does the same job. EXPDT is an optional parameter.

Note: - Do not code the EXPDT for temporary dataset.

Syntax -

EXPDT={yyddd}
or
EXPDT={yyyy/ddd}
EXPDT=yyddd The dataset expiration date is set in the format yyddd.
Two digit year yy from 00 through 99.
Three-digit days ddd from 001 - 365 for normal years and 001 - 366 for leap years.
Note: Expiration dates of 99365 and 99366 are considered "never-scratch" dates. Datasets with these expiration dates are not deleted or written over and exist forever.
EXPDT=yyyy/ddd The dataset expiration date is set in the format yyyy/ddd.
Four digit year yyyy from 1900 - 2155.
Three-digit day number ddd from 001 - 365 for a non-leap year date and from 001 - 366 for a leap year date.
Note: Expiration dates of 1999/365 and 1999/366 are considered "never-scratch" dates. Datasets with these expiration dates are not deleted or written over and simply exist forever.

Examples -


Scenario - Define PDS with expiration date 02/19/2023.

//NEWPDS DD DSN=MTH.DATA.PSFILE,
//          DISP=(NEW,CATLG,DELETE),
//          UNIT=SYSDA,
//          SPACE=(TRK,(3,2,2),RLSE),
//          DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=1600),
//          EXPDT=23050