This section provides examples dealing with the following subjects:
Transferring files in several parallel runs
Transferring catalog entries of private disks
transfer to another processor with directory
transfer to another default catalog ID.
Transferring files to a public volume and Net-Storage
Transferring files in several parallel runs
The files of three users are to be transferred and processed in parallel.
/START-HSMS //EXPORT-FILES - ————————————————————————————————————————————————————— (1) // F-NAMES=($MANUAL.FILE.0*,$USEROLD.FILE.1*, - // $USERNEW.FILE.2*), - // DIR-NAME=HSMS.MAN.EXF.DIR.1(NEW-DIR=*YES), - // TO-STOR=*TAPE(VOL=(HSMS11,HSMS22,HSMS33)), - // SAVE-F=*NEW(RET-PER=0), - // OPER-CONTROL=*PAR(REPORT=*FULL,PAR-RUNS=3, - —————————————————————— (2) // OUT=HSMS.MAN.R.EXF.1,WAIT-F-C=*YES) % HSM0003 HSMS STATEMENT COMPLETED //SHOW-ARCHIVE - ————————————————————————————————————————————————————— (3) // ARCH-NAME=*BY-DIR(DIR-NAME=HSMS.MAN.EXF.DIR.1), - // SELECT=*SAVE-F
SHOW-ARCHIVE (SAVE-FILES) INFORMATION = SUMMARY ARCHIVE-NAME = BY-DIR(:2BY:$TSOS.HSMS.MAN.EXF.DIR.1) SAVE-FILE-STATE = ANY SAVE-FILE-STORAGE = ANY CREATED-BEFORE = LATEST EXPIRATION-BEFORE = LATEST -------------------------------------------------------------------------------- M SFID CREA-DATE EXP-DATE OBS ACCESS ST DEVICE #VOL #SV #R UNS S.160812.155059 16-08-12 16-08-12 YES ALL TAP TAPE-C4 3 1 3 .... NEXT-PAGE: + (+, -, ++, --, E) % HSM0012 END OF OUTPUT LIST REACHED
% HSM0003 HSMS STATEMENT COMPLETED //END % HSM0014 HSMS PROGRAM TERMINATED
/START-HSMS //IMPORT-FILES F-NAMES=*ALL, - ——————————————————————————————————————— (4) // SAVE-F=*BY-VOL(VOL= - // (*GROUPED-BY-RUN(HSMS11), - ———————————————————————————————————— (5) // *GROUPED-BY-RUN(HSMS22), - // *GROUPED-BY-RUN(HSMS33))), - // REPL-F-AND-JV=*YES, - // OPER-CONTROL=*PAR(REPORT=*FULL,PAR-RUNS=3, - ————————————————————— (6) // OUT=HSMS.MAN.R.IMF.1, - // WAIT-F-C=*YES) % HSM0003 HSMS STATEMENT COMPLETED //END % HSM0014 HSMS PROGRAM TERMINATED
(1) | The files of three different user IDs are written onto magnetic tape cartridges in one export run. (The report of this run serves as an example for discussing the report format, see section "Reports"f.) |
(2) | Three parallel runs are defined, over which HSMS distributes the magnetic tape cartridges specified under VOLUMES. |
(3) | As the export run was effected with a directory, the attributes of the generated save file can be obtained via SHOW-ARCHIVE. The files were written to three volumes (#VOL) in three parallel runs (#RUNS). |
(4) | The files are read in again in an import run, the save file being defined by the volumes. |
(5) | A separate *GROUPED-BY-RUN entry is made for each magnetic tape cartridge of a parallel run. VOLUME=(HSMS11,HSMS22,HSMS33) could be entered alternatively. However, *GROUPED-BY-RUN results in a runtime improvement. |
(6) | Moreover, three parallel runs must be declared. |
Transferring catalog entries of private disks
The catalog entries of private disks are transferred to another BS2000 processor.
/START-HSMS //EXPORT-FILES F-NAMES=$MANUAL.FILE.*, - ————————————————————————————— (1) // SUP=*PRIV-DISK(VOL=*ALL,CAT-ENTRIES-ONLY=*YES), - ———————————————— (2) // DIR-NAME=*NONE, - // TO-STOR=*TAPE(VOL=HSMS33), - // SAVE-F=*NEW(RET-PER=0), - // OPER-CONTROL=*PAR(REPORT=*FULL) % HSM0002 HSMS STATEMENT ACCEPTED //END % HSM0014 HSMS PROGRAM TERMINATED
On another processor:
/START-HSMS //IMPORT-FILES F-NAMES=*ALL, - ——————————————————————————————————————— (3) // SAVE-F=*BY-VOL(VOL=HSMS33), - // ORIG-SUP=*PRIV-DISK(VOL=WORKKB), - // REPL-F-AND-JV=*YES, - // OPER-CONTROL=*PAR(REPORT=*FULL) % HSM0002 HSMS STATEMENT ACCEPTED //END % HSM0014 HSMS PROGRAM TERMINATED
(1) | In an export run, the catalog entries of all those files on private disks whose names begin with the string “$manual.file” are written to cartridge. No directory is created. |
(2) | This entry CATALOG-ENTRIES-ONLY causes only the catalog entries but not the data to be included in the save file. |
(3) | The catalog entries of the files matching the search string and residing on private disk WORKKB are read in on a BS2000 processor in an import run. The save file is determined via the cartridge. |
Transfer to another processor with directory
Various files are to be transferred to another BS2000 processor under a different user ID. A directory is used.
/START-HSMS //EXPORT-FILES F-NAMES=$MANUAL.FILE.*, - ————————————————————————————— (1) // DIR-NAME=$MANUAL.HSMS.MAN.EXF.DIR.4 - // (NEW-DIR=*YES,SAVE-DIR=*YES), - // TO-STOR=*TAPE(VOL=HSMS33), - // SAVE-F=*NEW(RET-PER=0), - // OPER-CONTROL=*PAR(REPORT=*FULL) % HSM0002 HSMS STATEMENT ACCEPTED //END % HSM0014 HSMS PROGRAM TERMINATED
On another processor:
/START-HSMS //IMPORT-FILES F-NAMES=*DIRECTORY, - ————————————————————————————————— (2) // NEW-F-NAMES=*BY-RULE(NEW-USER-ID=USERNEW2), - // SAVE-F=*BY-VOL(VOL=HSMS33), - // REPL-F-AND-JV=*YES, - // OPER-CONTROL=*PAR(REPORT=*FULL) % HSM0002 HSMS STATEMENT ACCEPTED //IMPORT-FILES F-NAMES=$MANUAL.FILE., - —————————————————————————————— (3) // NEW-F-NAMES=*BY-RULE(NEW-USER-ID=USERNEW2), - // SAVE-F=*FROM-DIR(DIR-NAME=$USERNEW2.HSMS.MAN.EXF.DIR.4), - // REPL-F-AND-JV=*YES, - // OPER-CONTROL=*PAR(REPORT=*FULL) % HSM0002 HSMS STATEMENT ACCEPTED //END % HSM0014 HSMS PROGRAM TERMINATED
(1) | All files. of user ID MANUAL whose name begins with FILE are written to a cartridge using EXPORT-FILES. For the run, a new directory is created and written onto the export volume. The report is directed to SYSLST. |
(2) | In a first import run the directory is read in. The save file is determined via the volume. |
(3) | Subsequently an import run for the other files is started using the directory. The directory could also be used to select the files via SELECT-FILE-NAMES prior to the run. |
Transfer to another default catalog ID
A user is to maintain his files on a different default pubset in future. For this purpose, the existing files must be transferred to the new default pubset.
/START-HSMS //EXPORT-FILES F-NAMES=$MANUAL.*, - —————————————————————————————————— (1) // TO-STOR=*TAPE(VOL=HSMS33), - // SAVE-F=*NEW(RET-PER=0), - // OPER-CONTROL=*PAR(REPORT=*FULL, - // OUT=HSMS.MAN.R.EXF.6,WAIT-F-C=*YES) % HSM0003 HSMS STATEMENT COMPLETED //END % HSM0014 HSMS PROGRAM TERMINATED /MODIFY-USER-ATTRIBUTES MANUAL,DEFAULT-PUBSET=2BC, - ————————————————— (2) / PUBLIC-VOLUME-SET=2BY /START-HSMS //IMPORT-FILES F-NAMES=:2BY:$MANUAL.*, - ————————————————————————————— (3) // NEW-F-NAMES=*BY-RULE(NEW-CAT-ID=2BC), - // SAVE-F=*BY-VOL(VOL=HSMS33), - // OPER-CONTROL=*PAR(REPORT=*FULL, - // OUT=HSMS.MAN.R.IMF.6,WAIT-F-C=*YES) % HSM0003 HSMS STATEMENT COMPLETED //END % HSM0014 HSMS PROGRAM TERMINATED
(1) | All files of user ID MANUAL are written to a cartridge using the HSMS statement EXPORT-FILES. |
(2) | The default catalog ID of user ID MANUAL is altered. |
(3) | The files are imported and written to the default catalog ID using the NEW-FILE-NAMES operand. The old catalog ID must be known, as it is no longer the default for this user ID. |
Note
When the export run is executed with CATALOG-ID-MODE=*NO, renaming is not required when the import run takes place. HSMS then automatically writes to the default catalog ID.
Transferring files to a public volume and Net-Storage
The files are copied to a public volume:
//EXPORT-FILES FILE-NAMES=LM.TEST.*, - // TO-STORAGE=*PUBLIC-DISK(PUBSET-ID=IBA6), - // OPERATION-CONTROL=*PAR (REPORT=*FULL, - // OUTPUT=LM.EXP.PUB.REP) % HSM0003 HSMS STATEMENT COMPLETED
The files are transferred to Net-Storage:
//EXPORT-FILES FILE-NAMES=LM.TEST.*, - // TO-STORAGE=*NET-STORAGE(VOLUMES=NATB00), - // OPERATION-CONTROL=*PAR (REPORT=*FULL, - // OUTPUT=LM.EXP.NET.REP) % HSM0003 HSMS STATEMENT COMPLETED
On a different server:
//IMPORT-FILES FILE-NAMES=LM.TEST, // SAVE-FILE=*BY-PUBLIC-DISK( - // SAVE-FILE-ID=S.161228.144335,PUBSET-ID=IBA6), —————————————————— (1) // OPERATION-CONTROL=*PARAMETERS( - // REPORT=*FULL,OUTPUT=LM.EXP.REP) % HSM0003 HSMS STATEMENT COMPLETED
(1) | The NATB00 Net-Storage volume is assigned to the IBA6 pubset. This pubset can be used for files transfers. |