Save files whose retention period has expired can be released (deleted) from the archive by the archive owner using the SAVE-FILES operand of the MODIFY-ARCHIVE statement. A save file can only be released as a whole, even if it contains more than one save version.
Individual save files can be selected for deletion by specifying their save file ID or via specific attributes. However, the save files can also be selected by means of their attributes. Consequently all save files whose retention period has expired can be deleted using the following HSMS statement:
//MODIFY-ARCHIVE SAVE-FILES=*DELETE - // (SAVE-FILE-ID=*BY-ATTR(SAVE-FILE-STATE=*OBSOLETE))
Released save files are removed from the archive. The volumes of level S2 save files are returned to the free volume pool. S1 save files or save files on private disk are deleted. However, a save file will not be removed:
- from version a backup archive if it contains at least one valid file version;
- from a migration archive if it contains data from currently migrated files.
A save file can be released even if its retention period has not yet expired or, in the case of migration or version backup archives, if it contains valid files or file versions respectively.
//MODIFY-ARCHIVE SAVE-FILES=*DELETE(...,FORCED-DELETE=*YES)
The save file is deleted without any further checks. The associated volumes in the archive’s volume pool are assigned the state FORCED-DELETE until the originally defined retention period has expired. If you are working with an archive without a volume pool, the volumes are also released without any further check when the above-mentioned statement is issued.