Links

Determining a data set expiration date

The process of determining a data set expiration date is implemented using the following commands:
Command
Description
BACKDSN
The command determines the expiration date of the data set according to the RETENTIONPERIOD parameter to allow the life cycle management to delete the data set after its expiration date has passed. If the parameter is not specified, the data set will not have an expiration date at all and will not be deleted by the lifecycle.
ARCHIVE
The command determines the expiration date of the data set according to the description listed below and logs it internally to allow the life cycle management to delete the data set after its expiration date has passed. This process can be skipped by specifying the RETENTIONPERIOD parameter to set the retention period manually.
DELARC
The command determines the expiration date of an archived data set in order to decide whether it is eligible for immediate deletion. Specifying the PURGE keyword will delete the archived data set regardless of the determined expiration date. It can be used to delete data sets that have not yet expired or data sets that do not have a valid expiration date.
DELCDS
The command determines the expiration date of a cloud data set in order to decide whether it is eligible for immediate deletion. Specifying the PURGE keyword will delete the archived data set regardless of the determined expiration date. It can be used to delete cloud data sets that have not yet expired or data sets that do not have a valid expiration date.
To calculate the data set expiration date, the commands explore the following:
1. Expiration date in the data set’s VTOC entry at the time of archive
2. Expiration date in the data set’s catalog entry at the time of archive
For VSAM data sets, the catalog entry of the cluster is inspected for a valid expiration date. For non-VSAM data sets, both the VTOC entry and the catalog entry are searched for a valid expiration date. The latest date of the two is considered to be the determinative expiration date.
DELARC & DELCDS only: If a valid expiration date is found and it is earlier than the current date, the data set and its catalog entry are deleted. If no valid expiration date was found, or if the expiration date is later than the current date, the data set is not deleted.
For SMS-managed data sets, if no valid expiration date was found, the command continues to search the data set’s Management Class expiration attributes. The data set’s Management Class is determined according to SMS rules:
1. The data set’s Management Class, if one is assigned
2. If not, the default Management Class, if one is assigned
3. If not, the Management Class default values expiration attributes are compared to the data set’s VTOC attributes:
  • The data set’s creation date is compared to EXPIRE AFTER DATE/DAYS
  • The data set’s last reference date is compared to PRIMARY DAYS NON-USAGE
If both Management Class attributes have values and can be used to calculate a valid expiration date, the latest of the two is considered to be the determinative expiration date.
DELARC only: If a valid expiration date is determined and is earlier than the current date, the data set and its catalog entry are deleted. If no valid expiration date was found, or if the expiration date has not passed yet, the data set is not deleted. Note that the default value for both Management Class attributes is “NO LIMIT”, meaning that the data set will not be deleted by automatic processes, but will be deleted using a manual action, such as the DELARC command.