Processing for expired backup versions of non-SMS-managed data sets

The EXPIREBV command processing for non-SMS-managed data sets is identical to that for SMS-managed data sets up to the point of determining the expired backup versions. EXPIREBV processing for SMS-managed data sets is described in Deleting expired backup versions from the backup volumes.

The EXPIREBV command has an initial process that checks the retention days value for each active backup version for each data set. If you specified a retention days value when the BACKDS command was issued during data set backup, the number of days since the date when the backup version was created is calculated and compared to the retention days value. If the number of days since the backup version was created is greater than the number of retention days, the backup version is deleted. This process includes both the active backup versions and the retained backup versions. If the retention duration has not been exceeded, the backup version is not processed, even if it meets other expiration criteria. If you did not specify a retention days value, the DELETEDIFBACKUP, CATALOGEDDATA, and UNCATALOGEDDATE parameters provided with the NONSMSVERSION parameter of the EXPIREBV command are used to determine which backup versions are deleted.

Note: If there is only one backup version of a data set, EXPIREBV does not delete the backup version. You must use the BDELETE or HBDELETE command to delete the backup version.

If the command includes (DELETEIFBACKEDUP(days)), DFSMShsm deletes any retired version older than the value specified by the days subparameter. It also deletes any additional older cataloged backup versions that exist.

If the command includes (CATALOGEDDATA(days)), DFSMShsm processes only data sets that were cataloged when they were backed up. For deleted data sets, if a date of scratch exists in the MCB record, DFSMShsm calculates the number of days since the date of scratch, and compares the result to the days specified in the command, or to the default of 60 days (if days was not specified). If the time since the date of scratch is more than the value specified or more than the default, DFSMShsm deletes all cataloged backup versions of the data set except for the retired version. For existing data sets, the days subparameter is ignored, and all excess backup versions (that result from the (H)ALTERDS command) are deleted.

When (CATALOGEDDATA(days)) is used, two executions are required to delete unwanted versions. The first execution determines that the data set was scratched and stores the date of the first EXPIREBV execution as the scratch date in the DFSMShsm control data set MCB record. A subsequent execution deletes the unwanted backup versions when the requested time has passed. The scratch date is generally not the date that the data set was actually scratched, but is the date EXPIREBV was next run after the data set was scratched.

Programming interface information

Programming interface information The scratch date is stored in the BCDS MCB record in the 4-byte field MCBSCRD (offset X'48', packed decimal). It can be displayed using the FIXCDS command. End of programming interface information

End of programming interface information
Note: DFSMShsm honors a scratch date stored by the DFSMShsm space maintenance and recovery utilities if the date is newer than the most recent backup date for the data set and if EXPIREBV has not already stored the scratch date itself.

If the command includes (UNCATALOGEDDATA(days)), DFSMShsm processes data sets that were uncataloged when they were backed up. DFSMShsm calculates the number of days since the uncataloged backup version was created and compares the result to the days specified in the command. There is no default value for days for uncataloged backup versions. If the time since the uncataloged backup version was created is more than the value specified, DFSMShsm deletes that version.