One or more guards are saved into a backup file with this statement. The backup file has ISAM format and can be saved with the usual backup programs (e.g. HSMS/ARCHIVE). The set of guards to be selected for the backup can be specified using wildcards. A nonprivileged user can only save the guards from his own ID while a guards administrator can save guards from all IDs.
Guards from just one pubset can be backed up into a named backup file with one statement. If several pubsets are to be saved, one backup run must be executed with its own backup file for each pubset.
Guards can reference other guards. For example, rules for co-ownership may contain references to guards of type STDAC. The RESOLVE operand can be used to control whether referenced guards are automatically included in the backup. In this case, all referenced guards are selected for the backup, regardless of their name or type. This means that the GUARD-NAME and GUARD-TYPE operands are meaningless for them. A cross reference list is created and output to SYSOUT/ SYSLST. If a reference guard cannot be accessed, e.g. because it does not belong to the (nonprivileged) caller, it is included in the list of referenced guards with a corresponding error code.
BACKUP-GUARDS | ||||||||||||||||||||||||||||||||||||||||
|
GUARD-NAME =
Specifies the guard(s) to be saved.
Dependency on the SELECT operand
A type-dependent limitation can be made to the selected set of guards by specifying
SELECT=*BY-ATTRIBUTES(TYPE=...).
Specifying
SELECT=*BY-ATTRIBUTES(RESOLVE=YES)
causes reference guards to be included in the save, regardless of their name or type.
GUARD-NAME = *
All guard names are to be selected for the backup.
GUARD-NAME = <filename 1..24 without-gen-vers with-wild(40)>
Part or fully qualified name of the guards to be saved. Guard names may contain wildcards, but only a guards administrator is allowed to specify wildcards in the user ID.
Wildcards are not allowed in the catalog ID because only the guards from a single pubset can be stored in a backup file.
The catalog ID determines which pubset is saved. The following applies if no catalog ID is specified:
If the caller is nonprivileged, the default pubset of the caller is saved
If the caller is a guards administrator and the user ID is specified with wildcards, the HOME pubset is saved
If the caller is a guards administrator and the user ID is specified without wildcards, the default pubset of this user ID is saved
Specifying the system default ID in guard names, e.g. $<filename> or $.<filename> is not supported.
SELECT =
Specifies the criteria to be used in addition to the GUARD-NAME operand for selecting the guards to be saved.
SELECT = *ALL
Selects all guard types and all referenced guards. The reference guards are thereby selected regardless of their names.
SELECT = *BY-ATTRIBUTES(...)
Modifies the set of guards selected with the GUARD-NAME operand with further criteria.
TYPE =
Specifies the guard type to limit selection to.
TYPE = *ANY
Selects guards regardless of their type.
TYPE = list-poss(6): <name 1..8>
Selects only guards of the specified type or types. The following entries are permitted:
Guard type | Meaning |
COOWNERP | Rule container for co-owner protection |
DEFAULTP | Rule container for default protection |
DEFPATTR | Attribute guards (default protection) |
DEFPUID | User ID guards (default protection) |
STDAC | Access condition guards |
UNDEF | Guards of undefined type |
RESOLVE =
Specifies whether the selected guards are to be searched for referenced guards.
RESOLVE = *YES
Selected guards are searched for referenced guards. Any referenced guards found are selected additionally, regardless of their name or type.
Guard type | Reference guards |
COOWNERP | Access condition guards specified in the rules |
DEFAULTP | Attribute and user ID guards specified in the rules |
DEFPATTR | Guards specified in the protection attributes |
DEFPUID | none |
STDAC | none |
UNDEF | none |
RESOLVE = *NO
The guards are not searched for referenced guards. Only the guards selected by their name (GUARD-NAME operand) and type (TYPE operand) are saved.
BACKUP-FILE-NAME = <filename 1..54 without-gen-vers>
Name of the backup file into which the guards are to be saved. The name is freely selectable. If a file of the same name already exists, it is either overwritten or the statement is rejected with an appropriate error message, depending on the REPLACE-BACKUP-FILE operand. Specifying the system default ID in file names, e.g. $<filename> or $.<filename> is allowed.
REPLACE-BACKUP-FILE =
Specifies whether an existing backup is to be overwritten or not.
REPLACE-BACKUP-FILE = *NO
An existing backup file is not overwritten.
REPLACE-BACKUP-FILE = *YES
An existing backup file is overwritten. The set file protection attributes remain intact.
OUTPUT = list-poss(2):
This operand defines the destination for the output of a result logging.
OUTPUT = *SYSOUT
Output is sent to the data display terminal if the command was entered in dialog mode. In batch mode, the output destination depends on the specifications in the batch job.
OUTPUT = *SYSLST(...)
Output is sent to the SYSLST system file.
SYSLST-NUMBER = *STD
Output is sent to the SYSLST system file.
SYSLST-NUMBER = <integer 1..99>
Two-digit number nn used for forming the file name SYSLSTnn.
Example: Output after a backup run
//backup-guards guard-name=*,backup-file-name=g-save
% PRO7014 '2' GUARDS ARE SAVED IN BACKUP FILE ':XXXX:$MARY.G-SAVE'< %******************************************************************************< %GUARDS-SAVE BACKUP-GUARDS Started by User MARY 2017-12-07/14:11:58< % ------------------------- < % *** Begin of Output *** < %******************************************************************************< %Backup File : :XXXX:$MARY.G-SAVE < %Backup Date : 2017-12-07/14:11:58 < %Backup Pubset : XXXX < % < %Backup Guard : :XXXX:$MARY.* < %Backup Type : COOWNERP, DEFAULTP, DEFPATTR, DEFPUID , STDAC , UNDEF < %Backup Resolve : *YES < %******************************************************************************< %Saved Guards : 2 < %Faulty Guards : 0 < %******************************************************************************< % < % Alphabetical List of Saved and Faulty Guards < % < %==============================================================================< %Guard Name Guard Type Error Status < %---------- ---------- ----- ------ < %:XXXX:$MARY.STDAC STDAC saved < %:XXXX:$MARY.SYS.UCF COOWNERP saved < %==============================================================================< % < % Alphabetical List of Cross References < % < %==============================================================================< %:XXXX:$MARY.SYS.UCF COOWNERP -> :XXXX:$MARY.STDAC STDAC < %------------------------------------------------------------------------------< %:XXXX:$MARY.STDAC STDAC <- :XXXX:$MARY.SYS.UCF COOWNERP < %==============================================================================< % < %******************************************************************************< %GUARDS-SAVE BACKUP-GUARDS Started by User MARY 2017-12-07/14:11:58< % ------------------------- < % *** End of Output *** < %******************************************************************************< %//