Command reference / save
RSTOBJ
Restore Object
Restores to the system one object or a group of objects in a single library that were saved to tape, optical volume or save file by a single command (SAVOBJ, SAVCHGOBJ or SAVLIB). It restores the object description and contents. For job queues, user-defined message queues, logical files and user queues only the descriptions are restored. Logical file access paths are restored if they were saved with ACCPTH(*YES) and the required conditions are met. Spooled file contents are restored if saved and SPLFDTA(*NEW) is specified. Objects can be restored even if their storage was freed at save time or they were deleted. 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: 6.
Restrictions
- Shipped with *EXCLUDE public authority.
- Requires *USE on CRTSAVF when restoring a save file that does not yet exist, and *USE on the save file itself. Restoring from tape or optical requires *USE on the device description.
- When OUTFILE names an existing database file, *EXECUTE is required on the library containing it.
- Requires *SAVSYS special authority, or *ADD and *EXECUTE on the target library and save file library, plus *OBJEXIST on existing objects (or ownership). *OBJEXIST and *USE are required for message queues. *ADD is needed on the owning user profiles for objects that do not exist. VOL(*SAVVOL) requires *USE on the saved-from library.
- RSTOBJ does not restore a library's data dictionary or its associated database files; use RSTLIB for that.
- Requires *USE on the media definition and *EXECUTE on its library when a media definition is used.
- If an OPM program is restored, the copy on the system must not be running during the restore.
- Objects saved by separate commands must be restored by separate commands.
- User domain objects (*USRSPC, *USRIDX, *USRQ) restored to a library not permitted by system value QALWUSRDMN become system domain objects.
Parameters
OBJ
Objects
Specifies the names of one or more objects to restore, as specific or generic names. The objects are restored from the first file that matches the search value and contains them. This is a required parameter.
Suggested / special values:
*ALL
*ALL- All objects saved from the specified library are restored, depending on OBJTYPE and OPTION.
SAVLIB
Saved library
Specifies the libraries that contained the saved objects. If *SAVLIB is used for RSTLIB, this is also the library the objects are restored to. This is a required parameter.
Suggested / special values:
*ANY, *SELECT
*ANY- Restores objects from the first version of all saved libraries found on tape from the sequence number in SEQNBR, or from all saved libraries in the OPTFILE directory.
*SELECT- The 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. It 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.
OBJTYPE
Object types
Specifies the types of system objects that are restored.
Allowed values:
*ALL, *ALRTBL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CRG, *CRQD, *CSI, *CSPMAP, *CSPTBL, *DTAARA, *DTAQ, *EDTD, *EXITRG, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IGCTBL, *IMGCLG, *JOBD, *JOBQ, *JOBSCD, *JRN, *JRNRCV, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODULE, *MSGF, *MSGQ, *NODGRP, *NODL, *NWSCFG, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SPADCT, *SQLPKG, *SQLUDT, *SQLXSR, *SRVPGM, *SSND, *SVRSTG, *S36, *TBL, *TIMZON, *USRIDX, *USRQ, *USRSPC, *VLDL, *WSCST
*ALL- All object types specified by name and saved from the specified library are restored. With OBJ(*ALL), all objects saved for that library are restored.
VOL
Volume identifier
Suggested / special values:
*MOUNTED, *SAVVOL
SEQNBR
Sequence number
Suggested / special values:
*SEARCH
POSITION
Starting position in file
Suggested / special values:
*FIRST
LABEL
Label
Suggested / special values:
*SAVLIB
ENDOPT
End of media option
Allowed values:
*REWIND, *LEAVE, *UNLOAD
SAVF
Save file
Qualified parts (object, then library; write LIBRARY/OBJECT)
Save file
Save file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
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.
FILEMBR
File member
Elements in order
File
File
Suggested / special values:
*ALL
Member
Member
Suggested / special values:
*ALL, *NONE
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:
*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.
FRCOBJCVN
Force object conversion
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
OUTPUT
Output
Allowed values:
*NONE, *PRINT, *OUTFILE
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:
*
RSTASPDEV
Restore to ASP device
Suggested / special values:
*SAVASPDEV
RSTASP
Restore to ASP number
Suggested / special values:
*SAVASP
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
OMITLIB
Libraries to omit
Suggested / special values:
*NONE
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/RSTOBJ.json and os/cl/help/RSTOBJ.json.