During automatic primary space management, the example scratches expired data sets that have valid explicit expiration dates in the data set's VTOC entry. The EXPIREDDATASETS parameter of the SETSYS command specifies the SCRATCH subparameter indicating for DFSMShsm to scratch any data set that has passed the expiration date. See the explanation of VALID EXPIRATION DATES under Specifying expiration attributes.
SETSYS EXPIREDDATASETS(SCRATCH)
An alternative subparameter for the EXPIREDDATASETS parameter is NOSCRATCH. NOSCRATCH is the default value and prevents DFSMShsm from scratching data sets that have passed the expiration date indicated in the data set's VTOC entry during space management processing.