Command reference / save
RSTLIB
Restore Library
Restores to the system one library or a group of libraries saved by SAVLIB, including the library description, object descriptions and object contents. For job queues, message queues, user queues and logical files only the object descriptions are restored, and logical file access paths are restored if they were saved. Spooled file contents on output queues are restored if saved and SPLFDTA(*NEW) is specified. The command can restore libraries whose object storage was freed at save time, or libraries that were deleted with DLTLIB. Existing objects keep their owner, primary group, public and private authorities, authorization list and auditing value, and objects in use are not restored. New objects use the saved owner, primary group, public authority and auditing value; a missing owner becomes QDFTOWN and a missing primary group becomes *NONE. The command ignores file overrides in effect for the job, except for the output file.
Allowed environments: *ALL.
Positional parameters: 4.
Restrictions
- Shipped with *EXCLUDE public authority.
- Requires *SAVSYS special authority, or *READ and *ADD authority on each library (or ownership) plus *OBJEXIST on existing objects (or ownership). Objects you lack authority for are skipped.
- VOL(*SAVVOL) requires *USE authority on the saved-from library.
- Restoring from a save file requires *USE on the save file, and *USE on the save file must also be granted when it must be created with CRTSAVF. Restoring from tape or optical requires *USE on the device description and device file.
- Using a media definition requires *USE on it and *EXECUTE on its library.
- Current OPM programs in a library must not be run while that library is being restored.
Parameters
SAVLIB
Saved library
Specifies the libraries to be restored to the system. This is a required parameter.
Suggested / special values:
*NONSYS, *ALLUSR, *IBM, *ANY, *SELECT
*NONSYS- Libraries saved by SAVLIB LIB(*NONSYS) are restored.
*ALLUSR- All user libraries are restored: libraries whose names do not begin with Q, except the listed #-prefixed IBM libraries, plus the listed Q-prefixed libraries that contain user data.
*IBM- All IBM-supplied libraries are restored, except the listed Q-prefixed libraries and QTEMP.
*ANY- Restores the first version of all saved libraries found on the tape from the sequence number given in SEQNBR, or all saved libraries in the OPTFILE directory.
*SELECT- Libraries identified in the SELECT parameter are restored. Only one library can be selected when restoring from a save file.
DEV
Device
Specifies the device used for the restore. The device must already be known to the system by a device description. This is a required parameter.
Suggested / special values:
*SAVF, *MEDDFN
*SAVF- The restore is done using the save file specified for SAVF.
*MEDDFN- The restore is done using the devices and media in the media definition specified for MEDDFN.
VOL
Volume identifier
Specifies the volume identifiers, or tape media library cartridge identifiers, to restore from. Volumes must be in the order they were saved.
Suggested / special values:
*MOUNTED, *SAVVOL
*MOUNTED- Objects are restored from the volumes in the device specified for DEV. Cannot be used with an optical media library device.
*SAVVOL- The system uses save or restore history to find the volumes holding the most recently saved version. Requires SEQNBR(*SEARCH) and does not allow SAVDATE or SAVTIME.
SEQNBR
Sequence number
Suggested / special values:
*SEARCH
LABEL
Label
Suggested / special values:
*SAVLIB
ENDOPT
End of media option
Allowed values:
*REWIND, *LEAVE, *UNLOAD
STRLIB
Starting library
Suggested / special values:
*FIRST
SAVF
Save file
Qualified parts (object, then library; write LIBRARY/OBJECT)
Save file
Save file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
MEDDFN
Media definition
Qualified parts (object, then library; write LIBRARY/OBJECT)
Media definition
Media definition
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OPTFILE
Optical file
Suggested / special values:
*
OMITLIB
Libraries to omit
Suggested / special values:
*NONE
OPTION
Option
Specifies how each object is handled during the restore.
Allowed values:
*ALL, *NEW, *OLD, *FREE
*ALL- All objects in the saved library are restored. Saved objects replace current versions, objects with no current version are added, and objects not on the media remain in the library.
*NEW- Only objects that do not already exist in the library are restored. Known objects are skipped with an informational message.
*OLD- Only objects that already exist in the library, with a saved version, are restored. Saved objects no longer in the library are not added.
*FREE- Objects are restored only where the existing objects have their space freed, into that freed space. Other objects are skipped with an informational message.
MBROPT
Data base member option
Specifies, for database files that exist on the system, which members are restored. Members of files that do not exist are all restored when the file is restored.
Allowed values:
*MATCH, *ALL, *NEW, *OLD
*MATCH- Saved members are restored only if the member lists match member for member the current system version. Not valid with ALWOBJDIF(*ALL).
*ALL- All members in the saved file are restored.
*NEW- Only members not known to the system are restored.
*OLD- Only members already known to the system are restored.
DFRID
Defer ID
Suggested / special values:
*DFT, *NONE
SPLFDTA
Spooled file data
Allowed values:
*NEW, *NONE
PVTAUT
Private authorities
Allowed values:
*NO, *YES
STRJRN
Start journaling
Allowed values:
*YES, *NO
SAVDATE
Date when saved
SAVTIME
Time when saved
ALWOBJDIF
Allow object differences
Specifies whether differences are allowed between saved objects and restored objects. Any value other than *NONE requires *ALLOBJ special authority. If differences are found, the final message is an escape message rather than the normal completion message.
Allowed values:
*NONE, *COMPATIBLE, *ALL, *AUTL, *FILELVL, *OWNER, *PGP
*NONE- None of the differences (authorization list, file level id, member level id, ownership, primary group) are allowed.
*COMPATIBLE- All differences are allowed, but only those compatible with existing physical files. File level differences are also allowed for existing logical files. Usually preferable to *ALL.
*ALL- All differences are allowed, including ones incompatible with existing database files. The saved data is restored but the result may not be correct.
*AUTL- Authorization list differences are allowed. An existing object keeps its own authorization list.
*FILELVL- File level and member level id differences are allowed for existing physical files whose format level identifiers match the saved ones.
*OWNER- Ownership differences are allowed. An existing object keeps its owner on the system.
*PGP- Primary group differences are allowed. An existing object keeps its primary group on the system.
FRCOBJCVN
Force object conversion
Specifies whether user objects are converted to the format required for the current operating system version or current machine during restore. Applies only to *MODULE, *PGM, *SRVPGM and *SQLPKG objects.
*SYSVAL- Conversion follows the QFRCCVNRST system value.
*NO- The objects are not converted during the restore operation.
*YES- The objects are converted during the restore operation.
Elements in order
Convert during restore
Convert during restore
Allowed values:
*YES
Objects to convert
Objects to convert
Allowed values:
*RQD, *ALL
RSTLIB
Restore to library
Suggested / special values:
*SAVLIB
RSTASPDEV
Restore to ASP device
Suggested / special values:
*SAVASPDEV
RSTASP
Restore to ASP number
Suggested / special values:
*SAVASP
OUTPUT
Output
Allowed values:
*NONE, *PRINT, *OUTFILE
OUTFILE
File to receive output
Qualified parts (object, then library; write LIBRARY/OBJECT)
File to receive output
File to receive output
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OUTMBR
Output member options
Elements in order
Member to receive output
Member to receive output
Suggested / special values:
*FIRST
Replace or add records
Replace or add records
Allowed values:
*REPLACE, *ADD
INFTYPE
Type of output information
Allowed values:
*OBJ, *MBR
OMITOBJ
Objects to omit
Elements in order
Object
Object
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Suggested / special values:
*NONE, *ALL
Library
Library
Suggested / special values:
*ALL
Object type
Object type
Suggested / special values:
*ALL
SELECT
Select
Elements in order
Include or omit
Include or omit
Allowed values:
*INCLUDE, *OMIT
Object
Object
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Suggested / special values:
*ALL
Library
Library
Suggested / special values:
*ALL
Object type
Object type
Suggested / special values:
*ALL
Object attribute
Object attribute
Suggested / special values:
*ALL, *BLANK
File member
File member
Suggested / special values:
*ALL, *ALLMBR
Generated from os/cl/catalog/RSTLIB.json and os/cl/help/RSTLIB.json.