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

Parameters

SAVLIB Saved library

Specifies the libraries to be restored to the system. This is a required parameter.

Type
*GENERIC
Required
Yes
Length
10
List limit
300
Case
Uppercase

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.

Type
*NAME
Required
Yes
Length
10
List limit
4
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*MOUNTED
Length
50
List limit
75
Case
Uppercase

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

Type
*UINT4
Required
No
Default
*SEARCH
Range
1 to 16777215
Case
Uppercase

Suggested / special values: *SEARCH

LABEL Label

Type
*CHAR
Required
No
Default
*SAVLIB
Length
17
Case
Uppercase

Suggested / special values: *SAVLIB

ENDOPT End of media option

Type
*CHAR
Required
No
Default
*REWIND
Length
7
Case
Uppercase

Allowed values: *REWIND, *LEAVE, *UNLOAD

STRLIB Starting library

Type
*NAME
Required
No
Default
*FIRST
Length
10
Case
Uppercase

Suggested / special values: *FIRST

SAVF Save file

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Save file Save file

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

MEDDFN Media definition

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Media definition Media definition

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OPTFILE Optical file

Type
*CHAR
Required
No
Default
*
Length
50
Case
Uppercase

Suggested / special values: *

OMITLIB Libraries to omit

Type
*GENERIC
Required
No
Default
*NONE
Length
10
List limit
300
Case
Uppercase

Suggested / special values: *NONE

OPTION Option

Specifies how each object is handled during the restore.

Type
*CHAR
Required
No
Default
*ALL
Length
5
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*MATCH
Length
6
Case
Uppercase

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

Type
*NAME
Required
No
Default
*DFT
Length
10
Case
Uppercase

Suggested / special values: *DFT, *NONE

SPLFDTA Spooled file data

Type
*CHAR
Required
No
Default
*NEW
Length
5
Case
Uppercase

Allowed values: *NEW, *NONE

PVTAUT Private authorities

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

STRJRN Start journaling

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES, *NO

SAVDATE Date when saved

Type
*DATE
Required
No
Case
Uppercase

SAVTIME Time when saved

Type
*TIME
Required
No
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*NONE
Length
11
List limit
4
Case
Uppercase

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.

Type
*ELEM
Required
No
Case
Uppercase
*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

Type
*CHAR
Required
No
Default
*YES
Length
4
Case
Uppercase

Allowed values: *YES

Objects to convert Objects to convert

Type
*CHAR
Required
No
Default
*RQD
Length
4
Case
Uppercase

Allowed values: *RQD, *ALL

RSTLIB Restore to library

Type
*NAME
Required
No
Default
*SAVLIB
Length
10
Case
Uppercase

Suggested / special values: *SAVLIB

RSTASPDEV Restore to ASP device

Type
*NAME
Required
No
Default
*SAVASPDEV
Length
10
Case
Uppercase

Suggested / special values: *SAVASPDEV

RSTASP Restore to ASP number

Type
*UINT2
Required
No
Default
*SAVASP
Range
1 to 32
Case
Uppercase

Suggested / special values: *SAVASP

OUTPUT Output

Type
*CHAR
Required
No
Default
*NONE
Length
8
Case
Uppercase

Allowed values: *NONE, *PRINT, *OUTFILE

OUTFILE File to receive output

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

File to receive output File to receive output

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OUTMBR Output member options

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Member to receive output Member to receive output

Type
*NAME
Required
No
Default
*FIRST
Length
10
Case
Uppercase

Suggested / special values: *FIRST

Replace or add records Replace or add records

Type
*CHAR
Required
No
Default
*REPLACE
Length
8
Case
Uppercase

Allowed values: *REPLACE, *ADD

INFTYPE Type of output information

Type
*CHAR
Required
No
Default
*OBJ
Length
4
Case
Uppercase

Allowed values: *OBJ, *MBR

OMITOBJ Objects to omit

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Object Object

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*GENERIC
Required
No
Default
*NONE
Length
10
Case
Uppercase

Suggested / special values: *NONE, *ALL

Library Library

Type
*GENERIC
Required
No
Default
*ALL
Length
10
Case
Uppercase

Suggested / special values: *ALL

Object type Object type

Type
*CHAR
Required
No
Default
*ALL
Length
50
Case
Uppercase

Suggested / special values: *ALL

SELECT Select

Type
*ELEM
Required
No
Case
Uppercase
Elements in order

Include or omit Include or omit

Type
*CHAR
Required
No
Default
*INCLUDE
Length
8
Case
Uppercase

Allowed values: *INCLUDE, *OMIT

Object Object

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*GENERIC
Required
No
Default
*ALL
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

Type
*GENERIC
Required
No
Default
*ALL
Length
10
Case
Uppercase

Suggested / special values: *ALL

Object type Object type

Type
*CHAR
Required
No
Default
*ALL
Length
50
Case
Uppercase

Suggested / special values: *ALL

Object attribute Object attribute

Type
*CHAR
Required
No
Default
*ALL
Length
50
Case
Uppercase

Suggested / special values: *ALL, *BLANK

File member File member

Type
*GENERIC
Required
No
Default
*ALL
Length
10
Case
Uppercase

Suggested / special values: *ALL, *ALLMBR

IBM command documentation

Generated from os/cl/catalog/RSTLIB.json and os/cl/help/RSTLIB.json.