The Restore All Libraries command allows the restore of all libraries
found on a tape. You do not need to know the name of the libraries
on the tape.
The normal RSTLIB command allows only a single library to be restored
per command unless a special value was used for the library on SAVLIB
(e.g. *NONSYS).
There are a few important restrictions with RSTALLLIB:
** The user must be authorized to the TAARSTALLC authorization
list. This is the same authorization list used by RSTMNYLIB
and RSTALLCHG.
** The tape must have been saved with the SAVLIB command.
Objects saved by SAVOBJ, SAVCHGOBJ, SAVSECDTA, SAVDLO etc.
will not be restored.
** The file on tape must be the same name as the library to be
restored. You must default the LABEL parameter when using
SAVLIB.
The RSTALLLIB command uses CHKTAP and RSTLIB to restore all of the
libraries which are found on the media. The CHKTAP command allows
the retrieval of the tape file name for each file sequence number.
The SAVLIB command defaults to store the library name into the tape
file name field. The RSTLIB command is then issued for each library.
Thus you do not have to know the library names in order to
successfully restore.
The library does not have to exist on the system when using
RSTALLLIB. The same rules for restoring over an existing library are
in effect as with RSTLIB. RSTALLLIB supports the same options as
does RSTLIB (e.g. OPTION, MBROPT, ALWOBJDIF) to allow you to specify
various actions if objects already exist.
Printed output occurs to QPRINT with one line per library containing
counts for how many objects were or were not restored. For the
specific objects which were not restored and the reasons, you will
need either the:
** RSTLIB OUTPUT listing
** Job log. This can be provided in a more readable fashion, by
use of the CHKSAVRST command which is the default provided on
the command. For some low level messages, you will need the
job log.
If you want to restore only some of the libraries or some of the
objects on the media, you must issue individual RSTLIB or RSTOBJ
commands.
A restart capability exists by allowing the restore of all libraries
beginning at a specified file sequence number on the tape.
You may omit up to 40 libraries from being restored.
Restrictions
------------
** Only libraries saved by SAVLIB can be restored. Saving by the
use of SAVOBJ, SAVCHGOBJ etc. will create files that cannot
be restored by RSTALLLIB.
** You must take the default of LABEL(*LIB) on the SAVLIB command
in order for RSTALLLIB to be successful.
** If SAVLIB *NONSYS media is used, the first file output
contains the library names. This file must be bypassed with
the SEQNBR option. Normally, you would not want to use
RSTALLLIB against the *NONSYS media.
Considerations
--------------
During processing, status messages are sent to the external message
queue informing the operator of what library is being restored and
what file sequence number is being operated on.
If the RSTALLLIB command is interrupted (e.g. ENDJOB), recovery
capability is provided by the sequence number parameter. If an
interruption occurs, you can restart processing at a specified file
sequence number. The file sequence number is presented in the status
message and is also sent as an informational message to the job log.
You can look at the job log to determine the last file sequence
number correctly restored.
Command parameters *CMD
------------------
DEV The tape device name. Only a single device may be
named (no overlap rewind support).
SEQNBR The beginning tape file sequence number. The
default is 1 meaning the first file on the tape.
A different number should be used if you have other
files on the same tape you want to jump over such as
the first file created by a function like SAVLIB
LIB(*NONSYS). You may also use the sequence number
if the restore was interrupted and you want to
continue or you want to begin the restore with the
Nth volume of a multi-volume save.
ENDSEQNBR The ending tape file sequence number. The default
is *END meaning the last file found on the tape. If
a value like 10 is specified, the file sequence
number 10 would be restored, but none of the files
after 10.
ENDOPT Whether to rewind the tape at the end of the
command. The default is *REWIND. *LEAVE or *UNLOAD
can be specified. The option you specify does not
take affect until the last RSTLIB command is
complete.
OPTION Whether to restore all objects, new objects etc.
This is the same parameter as on RSTLIB. The
default is *ALL (the same as RSTLIB).
MBROPT Whether to restore data base files if the members do
not completely match. This is the same parameter as
on RSTLIB. The default is *MATCH (the same as
RSTLIB).
ALWOBJDIF Whether to allow object differences or not. The
default is *NONE (the same as RSTLIB). *ALL may be
specified. If MBROPT(*MATCH) is used,
ALWOBJDIF(*ALL) cannot be specified.
RSTASP The ASP to restore the libraries to. The default is
*SAVASP meaning the same ASP the library was saved
from.
An ASP number from 1 to 32 may be entered to restore
the libraries to a specific ASP.
OMITLIBS Whether to omit any libraries from being restored.
The default is *NONE.
A list of up to 40 libraries may be omitted. If a
library is specified and does not exist on the tape,
the printed output contains a special message.
OUTPUT Whether to print a listing of the restored objects.
This is the same option as on RSTLIB. The default
is *NONE (the same as RSTLIB). A listing to QPRINT
(one line per library restored) will always occur.
CHKSAVRST A *YES/*NO option for should the TAA Tool CHKSAVRST
command be run. The default is *YES. The CHKSAVRST
command will produce a listing to QPRINT of all the
S/R messages which have occurred during the job.
When the RSTALLLIB command begins and ends, a
message is sent to the job log with the CPF9898
message. This will be picked up by the CHKSAVRST
command to assist you in determining which messages
belong to the RSTALLLIB command.
ERRORSONLY A *YES/*NO value which defaults to *NO. This
minimizes the number of messages that will be
printed. This parameter is passed through to the
CHKSAVRST command. See CHKSAVRST for a complete
description.
Security considerations
-----------------------
The RSTALLLIB tool must be created by a user with Security Officer's
rights. This will avoid any security restrictions on a restore. For
this reason, the objects are created by CRTTAATOOL so that only a
user with *USE authority to the TAARSTALLC authorization list may use
them. The CL program TAARSTDC is created as USRPRF(*OWNER).
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKSAVRST Check save/restore
EDTVAR Edit variable
Implementation
--------------
The tool is ready to use, but a user must be authorized to the
TAARSTALLC authorization list. This is the same authorization list
used by RSTMNYLIB and RSTALLCHG. To authorize a user, use EDTAUTL or
specify:
ADDAUTLE AUTL(TAARSTALLC) USER(xxx) AUT(*USE)
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
RSTALLLIB *CMD TAARSTD QATTCMD
TAARSTDC *PGM CLP TAARSTDC QATTCL
TAARSTDR *PGM RPG TAARSTDR QATTRPG
|