Configuring migration cleanup

During automatic secondary space management, DFSMShsm cleans up the migration control data set (MCDS) and the migration volumes by:

You can control the age of the MCDS records and statistics records to be deleted, the number of cleanup tasks that run concurrently, and the days on which migration cleanup is done.

Data sets that are eligible for ML2 reconnection with the fast subsequent migration function may have their MCD records retained for a longer period of time than for nonreconnectable data sets. This increases the likelihood of a reconnection when the data set next migrates. However, keeping the MCD records longer (while increasing the likelihood of reconnection) also causes growth in the size of the MCDS.

The MIGRATIONCLEANUPDAYS parameter of the SETSYS command follows the form:
 SETSYS MIGRATIONCLEANUPDAYS(recalldays statdays reconnectdays)

Replace recalldays with a decimal number between 1 and 999 that specifies the number of days that DFSMShsm keeps MCDS data set records for recalled data sets that are not compacted, or are compacted and meet or exceed the current value of SETSYS COMPACTPERCENT. For data sets that are compacted but do not meet the current value of SETSYS COMPACTPERCENT, the MCDS data set records are retained for 90 days.

Replace statdays with a decimal number from 1 to 999 that specifies the number of days DFSMShsm keeps the daily and volume statistics records. The REPORT command uses these records, which the IDCAMS DCOLLECT function also collects.

Replace reconnectdays with the number of days that you want to add to the predicted remigration date to control retention of the MCD record for reconnectable data sets. The predicted remigration date is based on the number of days that the data set was unreferenced before the date of its last migration. MCD records for reconnectable data sets are kept until they meet both the recalldays and the reconnectdays criteria.

You can specify different ages for MCDS records and statistics records.

Example: You can specify the following command to the ARCCMDxx member in each DFSMShsm host:
SETSYS MIGRATIONCLEANUPDAYS(25 10 3)

In this example, the length of time to keep MCDS records is a period of 25 days. This is because 20 days is the longest period of residence on a specified DFSMShsm-managed volume. Therefore, any data set that is recalled has a chance to migrate again before its MCDS record is scratched. Daily statistics and volume statistics records are kept for a period of 10 days. MCDS records for data sets that are marked as eligible for reconnection are kept 3 days beyond their predicted remigration date. The reconnectdays value can be adjusted up or down, if the data set is expected to reside on level 0 for a shorter or longer period before its next migration as compared to its most recent migration.

Note: The MIGRATIONCLEANUPDAYS(recalldays) parameter of the SETSYS command is one of the criteria that are used for deleting the MCD record of a recalled data set. However, if the data set was compacted during migration and is not eligible for compaction again, the MCD record is kept for at least 90 days. The 90 day retention occurs regardless of the value specified by recalldays. Also the MCD record specifies a count of the number of times that a data set by this name has migrated. This historic information is lost when the MCD record is deleted. If you plan to use this field, use this information to influence the value that you use for recalldays.

Related reading

For more information about fast subsequent migration, see Reconnecting data sets using fast subsequent migration.