Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Procedure-controlled restoration

&pagelevel(5)&pagelevel

Procedure commands are derived from the saved guard information and written into a procedure file specified by the user. This procedure file has the SAM file format and can be modified with a text editor such as EDT.

The procedure contains the same information as a GUARDS-SAVE log in the form of comment lines: the header and footer lines, the general conditions and (at the end of the procedure) a summary list of all the guards restored by the procedure.

The procedure is structured such that the guards are restored in alphabetical order. The following information is entered in the form of procedure comments before the commands for restoring a guard:

  • the path name as read from the backup file

  • the path name as reassembled after renaming (if present)

  • the reference guards that occur in the guard together with their old and, if applicable, new path names

For handling errors, jump marks are generated whose names are formed from one letter and a seven-digit number. The number of the jump mark for the first guard to be restored is 0000001 and this is then incremented by one each time. If the number of jump marks exceeds 999999999, an error is reported and the procedure generation process is aborted. In this case, it is recommended to split the restoration into multiple runs, e.g. by generating a separate restoration procedure for each guard type.

The following actions are executed during procedure creation, depending on the REPLACE operand during the restoration run:

  • REPLACE=*YES

    /DELETE-GUARD

    Deletes a guard, if it exists. Appropriate jump marks can be used to trap the condition where the guard to be deleted does not exist.

    /CREATE-GUARD

    Creates the guard new and restores the guard attributes.

    /ADD-... or /MODIFY-...

    Restores the guard contents.

  • REPLACE=*NO

    /CREATE-GUARD

    Attempts to create the guard new and restore the attributes.

    If the guard already exists, the procedure logs an appropriate text message and then continues with the next guard. If the guard does not exist, it is restored.

    /ADD-... or /MODIFY-...

    Restores the guard contents.

In guards of type DEFPATTR, in which protection attributes for standard protection can be defined, it is also possible to specify read, write and execute passwords. These passwords are not restored by a procedure-controlled restoration.A corresponding message is written into the procedure instead. If the password is to be restored exactly as it was saved, rather than being written manually into the procedure, guards of type DEFPATTR must be restored under program control (see section “Program-controlled restoration”).

Example

The following example shows a procedure that was generated by GUARDS-SAVE with which the two guards $TSOS.SYS.DEFPATTR and $TSOS.SYS.PDF can be restored with mutually swapped catalog and user IDs.

The referenced user ID guard $LUZIFER.DEFPUID was not previously saved and is therefore not found in the backup file during procedure generation.

The write passwords are not restored, a corresponding note is entered in the procedure instead.

/ BEGIN-PROCEDURE LOGGING=*NO 
/ 
/ REMARK MOD-JOB-OPT LOGGING=(LISTING=*YES) 
/ STEP 
/ ASSIGN-SYSLST TO=#RESTORE.LST.2017-12-15.170512 
/ STEP 
/ 
/ WRI-TEXT '*********************************************************' 
/ WRI-TEXT 'GUARDS-SAVE                                RESTORE-GUARDS' 
/ WRI-TEXT 'Proc Generated by User  TSOS      at  2017-12-15/17:05:12' 
/ WRI-TEXT '*********************************************************' 
/ WRI-TEXT '                  ***  Begin  ***                        ' 
/          "*********************************************************" 
/          "Backup File     : :XXXX:$TSOS.BACKUP-GUARD               " 
/          "Backup Date     : 2017-12-07/14:11:58                    " 
/          "Backup Pubset   : XXXX                                   " 
/          "                                                         " 
/          "Restore Guard   : :XXXX:$TSOS.*                          " 
/          "Restore Type    : COOWNERP, DEFAULTP, DEFPATTR,          " 
/          "                  DEFPUID , STDAC   , UNDEF              " 
/          "Restore Resolve : *YES                                   " 
/          "Restore Replace : *YES                                   " 
/          "                                                         " 
/          "New Pubset-Id   : 2OSC                                   " 
/          "New User-Id     : MARY                                   " 
/          "New Name        : *SAME                                  " 
/          "New Prog Pvs-Id : *SAME                                  " 
/          "*********************************************************" 
/ 
/          "** =================================================== **" 
/          "**                                                     **" 
/          "** Guard    :XXXX:$TSOS.DEFPATTR      DEFPATTR 0000001 **"    -- old path
/          "** -->      :2OSC:$MARY.DEFPATTR                       **"    -- new path
/          "**                                                     **" 
/          "** =================================================== **" 
/           DEL-GUARD :2OSC:$MARY.DEFPATTR                             -
/              ,DIALOG-CONTROL=*NO 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  deleted         **' 
/           SKIP .C0000001 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  delete  *error* **' 
/           SKIP .C0000001 
/ 
/           .C0000001 
/           CRE-GUARD :2OSC:$MARY.DEFPATTR                             -
/              ,SCOPE=*USER-ID                                         -
/              ,USER-INFO='                                           ' 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  created         **' 
/           SKIP .R0000001 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  create  *error* **' 
/           SKIP .E0000001 
/ 

/           .R0000001 
/           ADD-DEFAULT-PROTECTION-ATTR :2OSC:$MARY.DEFPATTR 
/           MOD-DEFAULT-PROTECTION-ATTR :2OSC:$MARY.DEFPATTR           -
/              ,ATTR-SCOPE=*CREATE-OBJECT                              -
/              ,ACCESS=*SYSTEM-STD                                     -
/              ,USER-ACCESS=*SYSTEM-STD                                -
/              ,BASIC-ACL=*SYSTEM-STD                                  -
/              ,GUARDS=*SYSTEM-STD                                     -
/              ,READ-PASSWORD=*SYSTEM-STD                              -
/              ,WRITE-PASSWORD=*NONE                                   - -- no passwd
/              ,EXEC-PASSWORD=*SYSTEM-STD                              -
/              ,DESTROY-BY-DELETE=*SYSTEM-STD                          -
/              ,SPACE-RELEASE-LOCK=*SYSTEM-STD                         -
/              ,EXPIRATION-DATE=*SYSTEM-STD                            -
/              ,FREE-FOR-DELETION=*SYSTEM-STD                          -
/              ,DIALOG-CONTROL=*NO 
/           MOD-DEFAULT-PROTECTION-ATTR :2OSC:$MARY.DEFPATTR           -
/              ,ATTR-SCOPE=*MODIFY-OBJECT-ATTR                         -
/              ,ACCESS=*SYSTEM-STD                                     -
/              ,USER-ACCESS=*SYSTEM-STD                                -
/              ,BASIC-ACL=*SYSTEM-STD                                  -
/              ,GUARDS=*SYSTEM-STD                                     -
/              ,READ-PASSWORD=*SYSTEM-STD                              -
/              ,WRITE-PASSWORD=*NONE                                   - -- no passwd
/              ,EXEC-PASSWORD=*SYSTEM-STD                              -
/              ,DESTROY-BY-DELETE=*SYSTEM-STD                          -
/              ,SPACE-RELEASE-LOCK=*SYSTEM-STD                         -
/              ,EXPIRATION-DATE=*SYSTEM-STD                            -
/              ,DIALOG-CONTROL=*NO 
/ WRI-TEXT '**                                                     **' 
/ WRI-TEXT '** Warning:                                            **' 
/ WRI-TEXT '** -------                                             **' 
/ WRI-TEXT '** WRITE-PASSWORD=*NONE restored for ATTR-SCOPE=*CRE   **'    -- warning
/ WRI-TEXT '** WRITE-PASSWORD=*NONE restored for ATTR-SCOPE=*MOD   **'    -- warning
/ WRI-TEXT '**                                                     **' 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  restored        **' 
/           SKIP .E0000001 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.DEFPATTR      DEFPATTR  restore *error* **' 
/           SKIP .E0000001 
/           .E0000001 
/ 
/          "** =================================================== **" 
/          "**                                                     **" 
/          "** Guard    :XXXX:$TSOS.SYS.PDF       DEFAULTP 0000002 **"    -- old path
/          "** -->      :2OSC:$MARY.SYS.PDF                        **"    -- new path
/          "**      Ref       $LUZIFER.DEFPUID                     **" 
/          "**      Ref       $TSOS.DEFPATTR                       **"    -- old path
/          "**      -->       $MARY.DEFPATTR                       **"    -- new path
/          "**                                                     **" 
/          "** =================================================== **" 
/ WRI-TEXT '** --------------------------------------------------- **' 
/           DEL-GUARD :2OSC:$MARY.SYS.PDF                              -
/              ,DIALOG-CONTROL=*NO 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  deleted         **' 
/           SKIP .C0000002 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  delete  *error* **' 
/           SKIP .C0000002 
/ 
/           .C0000002 
/           CRE-GUARD :2OSC:$MARY.SYS.PDF                              -
/              ,SCOPE=*USER-ID                                         -
/              ,USER-INFO='                                           ' 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  created         **' 
/           SKIP .R0000002 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  create  *error* **' 
/           SKIP .E0000002 
/           .R0000002 
/           ADD-DEFAULT-PROTECTION-RULE :2OSC:$MARY.SYS.PDF            -
/              ,PROTECTION-RULE=RULE1                                  -
/              ,RULE-POSITION=*LAST                                    -
/              ,PROTECT-OBJECT=*PARAMETERS                             -
/                (NAME=A                                               -
/                ,ATTRIBUTE-GUARD=$MARY.DEFPATTR                       -
/                ,USER-ID-GUARD=$LUZIFER.DEFPUID  )                    - -- missing
/              ,GUARD-CHECK=*NO                                        -
/              ,DIALOG-CONTROL=*NO 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  restored        **' 
/           SKIP .E0000002 
/           STEP 
/ WRI-TEXT '** :2OSC:$MARY.SYS.PDF       DEFAULTP  restore *error* **' 
/           SKIP .E0000002 
/           .E0000002 
/ 
/          "*********************************************************" 
/          "Guard Name                Guard Type Error   Status      " 
/          "----------                ---------- -----   ------      " 
/          ":XXXX:$TSOS.DEFPATTR      DEFPATTR           generated   "    -- old path
/          ":XXXX:$TSOS.SYS.PDF       DEFAULTP           generated   "    -- new path
/          "........................................................." 
/          ":XXXX:$LUZIFER.DEFPUID   -undefined- DMS0AA8 referenced  "    -- missing
/          "---------------------------------------------------------" 
/          "Generated Guards: 2                                      " 
/          "Faulty Guards   : 1                                      " 
/          "*********************************************************" 
/ 
/ WRI-TEXT '*********************************************************' 
/ WRI-TEXT '                  ***   End   ***                        ' 
/          "*********************************************************" 
/ WRI-TEXT 'GUARDS-SAVE                                RESTORE-GUARDS' 
/ WRI-TEXT 'Proc Generated by User  TSOS      at  2017-12-15/17:05:12' 
/ WRI-TEXT '*********************************************************' 
/ 
/ STEP 
/ ASSIGN-SYSLST TO=*PRIMARY 
/ STEP 
/ 
/ END-PROCEDURE