The HSMS administrator can move all a user’s files to a different pubset or a different user ID – independently of whether or not the files are migrated. If files are moved to another user ID, this user ID must be present in the target catalog ID before the transfer is made.
To move files, the HSMS administrator must execute the following HSMS statements in the specified order:
1. | A COPY-SAVE-FILE statement must be executed for all the affected save files that contain data belonging to the user ID in question: //COPY-SAVE-FILE SAVE-FILE-ID=<save file>,SELECT-FILES=$USER., - NEW-FILE-NAMES=*BY-RULE(NEW-CATALOG-ID=<new cat-id>, - NEW-USER-ID=<new user name>), - MIGRATION-STATE=*MIGRATED-FILE, - ARCHIVE-NAME=<name of the *SYSMIGRATE archive of the old cat-id>, - TO-ARCHIVE-NAME=<name of the *SYSMIGRATE archive of the new cat-id>, ... This HSMS statement generates a new save file to which the migrated files of the new user point. |
2. | //BACKUP-FILES FILE-NAMES=$USER., - NEW-FILE-NAMES=*BY-RULE(NEW-CATALOG-ID=<new cat-id>, - NEW-USER-ID=<new user name>), - SELECT-FILES=*ALL-FILES, - SAVE-OPTIONS=*PARAMETERS(SAVE-DATA=*S0), - ARCHIVE-NAME=<archive name>, ... The archive specified in this HSMS can be the default backup archive *SYSBACKUP of the new catalog ID. |
3. | //RESTORE-FILES FILE-NAMES=$<new user name>., - MIGRATED-FILES=*CATALOG-ONLY, - ARCHIVE-NAME=<archive name>, ... After restoration, all the catalog IDs point to the save file which was generated using the COPY-SAVE-FILE statement (see 1.). |