The HSMS administrator can also reorganize save files with invalid files on storage level S2 using the MIGRATE-FILES statement:
//MIGRATE-FILES FROM-STORAGE=*S2-STORAGE-LEVEL(...)
When a save file is reorganized a new save file is created and the original save file is automatically deleted. Several save files can be reorganized in a single call.
The HSMS administrator has the following options when reorganizing on S2:
With the SAVE-FILE-ID operand the administrator can specify a particular save file or restrict the selection to save files in a specific creation period. The default setting is the selection of all save files on S2, with the exception of the current standard save file, which is never reorganized.
With the UNUSED-SPACE operand the save files can be selected according to the percentage of invalid files they contain. For example, UNUSED-SPACE=60 means that only those save files which are at least 60% empty are reorganized.
When UNUSED-SPACE=100 is specified, the empty save files are deleted.