Restore Object (RSTOBJ)
The Restore Object (RSTOBJ) command restores to the system a single object or a group of objects in a single library that were saved on a tape or optical volume, or in a save file using a single command. Objects to be restored could have been saved by the Save Object (SAVOBJ), Save Changed Objects (SAVCHGOBJ) or Save Library (SAVLIB) command. The RSTOBJ command restores the object description and contents of each object specified in the command.
For job queues, user-defined message queues, logical files, and user queues, only the object descriptions are restored; the contents of those objects are not restored. However, logical file access paths can be saved by a save command with ACCPTH(*YES) specified; if this is done, the access paths can be restored. More information on restoring access paths is in the Database information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter. The contents of spooled files on output queues can be restored, if they were saved, by specifying *NEW for the Spooled file data (SPLFDTA) parameter.
The command can be used to restore the objects even if the object storage was freed when the objects were saved, or if the objects were deleted after they were saved. If the storage was not freed as part of a save operation, each object is restored in the same area of storage that it previously occupied. If the version of the object being restored is larger than the version in the system (for example, data records that were deleted from the system still exist in the saved version of a file), the additional storage needed for the object is acquired. If the saved version of the object is smaller (for example, data records that are added to the system), the space that was acquired for the object remains assigned to that object and available for use by that object.
If logical file access paths were saved (ACCPTH(*YES) was specified when the objects were saved), the access paths are restored if (1) all based-on physical files are also being restored by the same restore command, (2) the logical file is also being restored by the same restore command, or the logical file already exists on the system (the same file exists, not a re-created version), and (3) MAINT(*IMMED or *DLY) is in effect for the logical file if it still exists on the system.
If the storage was freed, the system finds the storage space needed to store the contents (only the data portion) of each file, module, program, service program, journal receiver, and Structured Query Language (SQL) package. If the objects do not exist on the system because they were deleted or they are being restored in a different system, the system must find the storage to store everything (the description and the data portion) about each unknown object.
The user profile of the system default owner (QDFTOWN) becomes the default owner of objects restored in the system whose owner is not known to the system.
If an object is being restored over an existing object on the system, the object auditing value of the existing object is kept. If the object is being restored as new to the system, the object auditing value is restored from the media.
ATTENTION: Do not use this command to restore licensed programs into library QSYS. Unpredictable results can occur.
Restrictions:
- This command is shipped with no public authority (*EXCLUDE).
- You must have use (*USE) authority for the Create Save File (CRTSAVF) command when restoring a save file that does not currently exist on the system.
- When saving or restoring to an existing database file using the OUTFILE parameter, you must have execute (*EXECUTE) authority to the library where the output database file is located.
- With the exception of overrides for the restore listing file and database files specified for the OUTFILE parameter, this command ignores all file overrides that are currently in effect for the job.
- You must have save system (SAVSYS) special authority, or all of the following object authorities:
- Add (*ADD) and execute (*EXECUTE) authorities for the specified library and save file library.
- Object existence (*OBJEXIST) authority for, or be the owner of, each object specified if the object already exists in the library on the system. *OBJEXIST and use (*USE) authorities are required for message queue objects. If the object does not already exist in the library on the system, you must have *ADD authority for the user profiles that own each object being restored. For spooled file data, *OBJEXIST authority is required for the output queue to which it is restored.
- If VOL(*SAVVOL) is specified, *USE authority to the saved-from library.
- The RSTOBJ command does not restore the library's data dictionary or its associated database files. To do this, the RSTLIB command must be used.
- You must have *USE authority for the save file to restore from the save file. In addition, the user must have *USE authority for the device description when restoring from a tape or optical device.
- When using a media definition, you must have *USE authority to the media definition and *EXECUTE authority to the media definition library.
- If this command is used to restore an OPM program, the copy of that program that is currently in the system must not be running while the program is being restored. If this occurs, the running program may fail or behave unpredictably.
- Objects saved by separate commands must also be restored by separate commands. If a single command is used, some of the objects are not restored.
- If the user domain object user space (*USRSPC), user index (*USRIDX), or user queue (*USRQ) is restored to a library that is not permitted in the system value QALWUSRDMN (allow user domain objects in libraries), the object is converted to a system domain object.
Keyword |
Description |
Choices |
Notes |
OBJ |
Objects |
Single values: *ALL Other values (up to 300 repetitions): Generic name, name |
Required, Positional 1 |
SAVLIB |
Saved library |
Single values: *ANY Other values (up to 300 repetitions): Generic name, name |
Required, Positional 2 |
DEV |
Device |
Single values: *SAVF, *MEDDFN Other values (up to 4 repetitions): Name |
Required, Positional 3 |
OBJTYPE |
Object types |
Single values: *ALL Other values (up to 74 repetitions): *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, *SRVPGM, *SSND, *SVRSTG, *S36, *TBL, *TIMZON, *USRIDX, *USRQ, *USRSPC, *VLDL, *WSCST |
Optional, Positional 4 |
VOL |
Volume identifier |
Single values: *MOUNTED, *SAVVOL Other values (up to 75 repetitions): Character value |
Optional, Positional 5 |
SEQNBR |
Sequence number |
1-16777215, *SEARCH |
Optional, Positional 6 |
LABEL |
Label |
Character value, *SAVLIB |
Optional |
ENDOPT |
End of media option |
*REWIND, *LEAVE, *UNLOAD |
Optional |
SAVF |
Save file |
Qualified object name |
Optional |
Qualifier 1: Save file |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
OPTION |
Option |
*ALL, *NEW, *OLD, *FREE |
Optional |
FILEMBR |
File member |
Values (up to 50 repetitions): Element list |
Optional |
Element 1: File |
Name, *ALL |
Element 2: Member |
Single values: *ALL, *NONE Other values (up to 50 repetitions): Generic name, name |
MBROPT |
Data base member option |
*MATCH, *ALL, *NEW, *OLD |
Optional |
SPLFDTA |
Spooled file data |
*NEW, *NONE |
Optional |
SAVDATE |
Date when saved |
Date |
Optional |
SAVTIME |
Time when saved |
Time |
Optional |
ALWOBJDIF |
Allow object differences |
Single values: *NONE, *ALL Other values (up to 4 repetitions): *AUTL, *FILELVL, *OWNER, *PGP |
Optional |
FRCOBJCVN |
Force object conversion |
Single values: *SYSVAL, *NO Other values: Element list |
Optional |
Element 1: Convert during restore |
*YES |
Element 2: Objects to convert |
*RQD, *ALL |
RSTLIB |
Restore to library |
Name, *SAVLIB |
Optional |
OUTPUT |
Output |
*NONE, *PRINT, *OUTFILE |
Optional |
MEDDFN |
Media definition |
Qualified object name |
Optional |
Qualifier 1: Media definition |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
OPTFILE |
Optical file |
Path name, * |
Optional |
RSTASPDEV |
Restore to ASP device |
Name, *SAVASPDEV |
Optional |
RSTASP |
Restore to ASP number |
1-32, *SAVASP |
Optional |
OUTFILE |
File to receive output |
Qualified object name |
Optional |
Qualifier 1: File to receive output |
Name |
Qualifier 2: Library |
Name, *LIBL, *CURLIB |
OUTMBR |
Output member options |
Element list |
Optional |
Element 1: Member to receive output |
Name, *FIRST |
Element 2: Replace or add records |
*REPLACE, *ADD |
INFTYPE |
Type of output information |
*OBJ, *MBR |
Optional |
OMITLIB |
Libraries to omit |
Single values: *NONE Other values (up to 300 repetitions): Generic name, name |
Optional |
OMITOBJ |
Objects to omit |
Values (up to 300 repetitions): Element list |
Optional |
Element 1: Object |
Qualified object name |
Qualifier 1: Object |
Generic name, name, *NONE, *ALL |
Qualifier 2: Library |
Generic name, name, *ALL |
Element 2: Object type |
Character value, *ALL |
Objects (OBJ)
Specifies the names of one or more objects to restore. The objects you specify will be restored from the first file that meets the search value and contains any of the objects. If a tape contains multiple files for the same library, you may need to specify the tape file sequence number to ensure that all of the correct objects are restored.
If the file does not contain all of the objects you specify, diagnostic messages will be issued for the objects not found. The completion message will contain a count of objects restored and objects not restored.
If the Object types (OBJTYPE) parameter is not specified when the command is run, all the object types listed in the description of that parameter are restored, if they are in the specified library on the media or in the save file, and if they have the specified names.
This is a required parameter.
Single values
- *ALL
- All the objects saved from the specified library are restored, depending on the values specified for the Object types (OBJTYPE) and Option (OPTION) parameters.
Other values (up to 300 repetitions)
- generic-name
- Specify one or more generic names of groups of objects in the specified library to restore. A generic name is a character string that contains one or more characters followed by an asterisk (*). If an asterisk is not specified with the name, the system assumes that the name is a complete object name.
- name
- Specify one or more names of specific objects to restore. Both generic names and specific names can be specified in the same command.
Saved library (SAVLIB)
Specifies the libraries that contained the saved objects. If *SAVLIB is specified or defaulted for the Restore to library (RSTLIB) parameter, this is also the name of the library to which the objects are restored.
Notes:
- If you specify more than one library, or a single value, or a generic library value:
- The Device (DEV) parameter must not specify *SAVF.
- The Restore to library (RSTLIB) parameter must specify *SAVLIB.
- The Label (LABEL) parameter must specify *SAVLIB.
- The Optical file (OPTFILE) parameter must specify * or end with /*.
- The tape or optical file that you select to restore may contain a library that does not match the value that you specify for this parameter. This parameter is used to determine the default LABEL value for a tape file and the default OPTFILE value for an optical file, but the restore operation does not verify that this parameter matches the saved library.
This is a required parameter.
Single values
- *ANY
- Restores objects from the first version of all saved libraries found on the tape beginning with the sequence number specified for the Sequence number (SEQNBR) parameter, or restores objects from all saved libraries found on the optical media in the directory specified for the OPTFILE parameter.
Other values (up to 300 repetitions)
- generic-name
- Specify the generic name of the libraries to be restored.
Note: A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, then all objects that have names with the same prefix as the generic object name are selected.
- name
- Specify the name of the library to restore. The name of the library being restored must be the same as the name that was used when the library was saved.
Device (DEV)
Specifies the name of the device used for the restore operation. The device name must already be known on the system by a device description.
This is a required parameter.
Single values
- *SAVF
- The restore operation is done using the save file specified for the Save file (SAVF) parameter.
- *MEDDFN
- The restore operation is done using the devices and media identified in the media definition specified for the Media definition (MEDDFN) parameter.
Other values
- optical-device-name
- Specify the name of the optical device used for the restore operation.
- tape-media-library-device-name
- Specify the name of the tape media library device used for the restore operation.
- tape-device-name
- Specify the names of one or more tape devices used for the restore operation. If a virtual tape device is used, it must be the only device specified. If you are using more than one tape device (up to a maximum of four), specify the names of the devices in the order in which they are used. When more than one tape volume is to be restored, using more than one tape device permits one tape volume to be rewound while another tape device processes the next tape volume. To use more than one device in parallel, a media definition must be specified.
Object types (OBJTYPE)
Specifies the types of system objects that are restored.
Single values
- *ALL
- All object types that are specified by name and were saved from the specified library are restored. If *ALL is also specified for the Objects (OBJ) parameter, all objects saved for that library are restored.
Other values
- object-type
- Specify the value for each of the types of objects to be restored, such as command (*CMD), file (*FILE), or program (*PGM).
To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt). For a description of the object types, see "Object types" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Note: *CFGL object types can be restored using the Restore Object (RSTOBJ) command only from objects saved on releases prior to V2R2M0. *CFGL object types saved on V2R2M0 and newer releases are restored using the Restore Configuration (RSTCFG) command.
Volume identifier (VOL)
Specifies the volume identifiers of the media or the cartridge identifiers of tapes in a tape media library device, from which the objects are being restored. The volumes must be in the same order as they were when the data was saved. The volume that contains the beginning of the file to be restored should be placed in the device.
Note: The version of the objects restored is the first version found in the specified location, unless a specific version is identified by the Date when saved (SAVDATE) and Time when saved (SAVTIME) parameters.
Single values
- *MOUNTED
- The objects are restored from the volumes placed in the device specified for the Device (DEV) parameter. For a media library device, the volume to be used is the next cartridge in the category mounted by the Set Tape Category (SETTAPCGY) command.
Note: This value cannot be specified when using an optical media library device.
- *SAVVOL
- The system, by using the save or restore history information, determines which volumes contain the most recently saved version of the objects.
Note: If this is a restore from an optical device, only the first 6 characters of the volume name are available. If the volume name of the optical media exceeds 6 characters, the volume may not be found. You should specify the complete volume or file name on the command instead of using VOL(*SAVVOL) when the name of the optical media exceeds 6 characters.
When *SAVVOL is specified, the following operational characteristics and restrictions apply:
- If the characteristics of the device specified in the DEV parameter do not match the device and location of the most recently saved version of the library, an error message is sent to the user, and the function is ended.
- If the wrong volume is placed in a device in the location specified by the command, a message is sent to the system operator that identifies the first volume that must be placed in the device before the objects can be restored.
- When OBJ(*ALL) and OBJTYPE(*ALL) is specified, the objects are considered in the order they would appear in a display produced by the Display Library (DSPLIB) command. The object names and types specified in the RSTOBJ command are used to determine which file of saved objects is used in the restore operation. One file is produced for each SAVLIB or SAVOBJ command run. The file chosen is the one in which the first considered object was last saved. Objects that were not saved in the file chosen to be processed, or that were more recently saved, are not restored; an error message is sent to the user for each unrestored object.
- If *SAVVOL is specified, the SAVDATE and SAVTIME parameters cannot be specified.
- If *SAVVOL is specified and the RSTLIB value is equal to the SAVLIB value, OPTION(*NEW) cannot be specified.
- If *SAVVOL is specified, SEQNBR(*SEARCH) and LABEL(*SAVLIB) must be specified.
Other values (up to 75 repetitions)
- character-value
- Specify the identifiers of one or more volumes in the order in which they are placed in a device and used to restore the data.
Sequence number (SEQNBR)
Specifies, when tape is used, which sequence number is used for the restore operation.
- *SEARCH
- The volume in the device is searched for a data file with an identifier that matches the FROMLABEL parameter value; when a match is found, the object is restored. If the last operation on the device specified *LEAVE for the End of tape option (ENDOPT) parameter, indicating that the tape is positioned at the location where the last operation ended, the file search starts with the first data file beyond the current tape position. If *LEAVE was not used for the End of tape option (ENDOPT) parameter of the last operation, or if the tape was manually rewound since the operation, the search starts with the first data file on the volume.
- 1-16777215
- Specify the sequence number of the file to be used for the restore operation.
Label (LABEL)
Specifies the name that identifies the data file to be used for the restore operation. This label must have been specified on the save command.
- *SAVLIB
- The file label is the name specified for the Saved library (SAVLIB) parameter.
- character-value
- Specify the data file identifier of the data file used for the restore operation. A maximum of 17 characters can be used. This option is valid only for a single-library restore.
End of media option (ENDOPT)
Specifies the operation that is automatically done on the tape or optical volume after the restore operation ends. If more than one volume is used, this parameter applies only to the last volume used; all other volumes are unloaded when the end of the volume is reached.
Note: This parameter is valid only if a tape or optical device name is specified for the DEV parameter. For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored.
- *REWIND
- The tape is automatically rewound, but not unloaded, after the operation has ended.
- *LEAVE
- The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
- *UNLOAD
- The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.
Save file (SAVF)
Specifies the save file used to restore the data.
Note: A value must be specified for this parameter if *SAVF is specified for the Device (DEV) parameter.
Qualifier 1: Save file
- name
- Specify the name of save file to be used.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the save file. If no current library entry exists in the library list, the QGPL library is used.
- name
- Specify the name of the library where the save file is located.
Option (OPTION)
Specifies how to handle restoring each object.
- *ALL
- All the objects in the saved library are restored to the library. Objects in the saved library replace the current versions in the system library. Objects not having a current version are added to the system library. Objects presently in the library, but not on the media, remain in the library.
- *NEW
- Only the objects in the saved library that do not exist in the current version of the system library are added to the library. Only objects not known to the system library are restored; known objects are not restored. This option restores objects that were deleted after they were saved or that are new to this library. If any saved objects have a version already in the system library, they are not restored, and an informational message is sent for each one, but the restore operation continues.
- *OLD
- Only the objects in the library having a saved version are restored; that is, the version of each object currently in the library is replaced by the saved version. Only objects known to the library are restored. If any saved objects are no longer part of the online version of the library, they are not added to the library; an informational message is sent for each one, but the restore continues.
- *FREE
- The saved objects are restored only if they exist in the system library with their space freed. The saved version of each object is restored on the system in its previously freed space. This option restores objects that had their space freed when they were saved. If any saved objects are no longer part of the current version of the library, or if the space is not free for any object, the object is not restored and an informational message is sent for each one. The restore operation continues, and all of the freed objects are restored.
File member (FILEMBR)
Specifies the database file members to restore. This parameter is made up of two parts: the file name and the member name. This parameter cannot be specified if *MATCH is specified for the Data base member option (MBROPT) parameter.
Each database file specified here must also be specified for the Objects (OBJ) parameter, by a specific name, a generic name, or *ALL. The Object types (OBJTYPE) parameter must either be *ALL or include *FILE. Generic names are not valid for the database file name but are allowed for the member name. Duplicate file names are not allowed.
There may be up to 50 of the file/member element list combinations specified for this parameter.
Element 1: File
- *ALL
- The list of member name values that follows this value applies to all files indicated on the OBJ parameter.
- name
- Specify the name of the database file from which the listed members are restored.
Element 2: Member
Single values
- *ALL
- All members are restored from the specified file.
- *NONE
- No members are restored from the specified file. Only the file description is restored.
Other values (up to 50 repetitions)
- generic-name
- Specify the generic name of the members to be restored from the specified file. A generic name is a character string that contains one or more characters followed by an asterisk (*). If an asterisk is not specified with the name, the system assumes that the name is a complete member name.
- name
- Specify the name of the member to be restored from the specified file.
Data base member option (MBROPT)
Specifies, for database files that exist on the system, which members are restored. If *MATCH is used, the member list in the saved file must match, member for member, the current version on the system. All members are restored for files that do not exist, if the file is restored.
- *MATCH
- The saved members are restored if the lists of the members where they exist match, member for member, the lists of the current system version. MBROPT(*MATCH) is not valid when *ALL is specified for the Allow object differences (ALWOBJDIF) parameter.
- *ALL
- All members in the saved file are restored.
- *NEW
- Only new members (members not known to the system) are restored.
- *OLD
- Only members already known to the system are restored.
Spooled file data (SPLFDTA)
Specifies whether to restore spooled file data and attributes.
- *NEW
- For each output queue that is restored, spooled file data that was saved with the output queue is restored, if it does not already exist on the system.
- *NONE
- No spooled file data is restored.
Date when saved (SAVDATE)
Specifies the date when the objects were saved. If the most recently saved version is not the one being restored, or if multiple saved versions exist on the media volume, specify the date that indicates which version of the objects to restore. If a volume identifier or *MOUNTED is specified for the Volume identifier (VOL) parameter, but SAVDATE is not, the version of the objects that is restored is the first version found on the volume. This parameter is valid only if a volume identifier or *MOUNTED is specified for the VOL parameter or if a save file is specified for the Save file (SAVF) parameter. This parameter is ignored when the Sequence number (SEQNBR) parameter is specified.
- date
- Specify the date that the library to be restored was saved. The date must be entered in the job date format.
Time when saved (SAVTIME)
Specifies the time at which the objects were saved.
If a volume identifier or *MOUNTED is specified for the Volume identifier (VOL) parameter, but this parameter is not specified, the version of the objects to be restored is the first version found on the volume. This parameter is valid only if the Date when saved (SAVDATE) parameter is also specified.
This parameter is ignored when a number is specified for the Sequence number (SEQNBR) parameter.
- time
- Specify the time that the library to be restored was saved. The time can be specified with or without a time separator:
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds.
- With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
Allow object differences (ALWOBJDIF)
Specifies whether differences are allowed between the saved objects and the restored objects.
Notes:
- You must have all object (*ALLOBJ) special authority to specify any value other than *NONE for this parameter.
- If differences are found, the final message for the restore operation is an escape message rather than the normal completion message.
The types of differences include:
- Authorization list: The saved object had an authorization list, and either the object exists on the system but does not have the same authorization list, or the object does not exist and it is being restored to a different system than the save system.
Note: This parameter has no effect when the saved object did not have an authorization list. If the object exists, it is restored with the authorization list of the existing object. If it does not exist, it is restored with no authorization list.
- File level id: The creation date and time of the database file on the system does not match the creation date and time of the file that was saved.
- Member level id: The creation date and time of the database file member on the system does not match the creation date and time of the member that was saved.
- Ownership: The owner of an object on the system is different than the owner of an object from the save operation.
- Primary Group: The primary group of an object on the system is different than the primary group of an object from the save operation.
Single values
- *NONE
- None of the differences listed above are allowed on the restore operation. See the description of each individual value to determine how differences are handled.
- *ALL
- All of the differences listed above are allowed on the restore operation. File level id and member level id differences are handled differently than the *FILELVL value. If there is a file level difference and *ALL is specified for the Data base member option (MBROPT) parameter, the existing version of the file is renamed and the saved version of the file is restored. If there is a member level difference, the existing version of the member is renamed and the saved version of the member is restored. This value will restore the saved data, but the result may not be correct. You will need to choose whether the restored data or the renamed data is correct, and you will need to make the necessary corrections to the database. For other differences, see the description of each individual value to determine how differences are handled.
Other values (up to 4 repetitions)
- *AUTL
- Authorization list differences are allowed. If the saved object had an authorization list and the object exists on the system but does not have the same authorization list, the object is restored with the authorization list of the existing object. If the saved object had an authorization list and the object does not exist and it is being restored to a different system than the save system, the object is restored and it is linked to the authorization list. If the authorization list does not exist, the public authority is set to *EXCLUDE.
If this value is not specified, authorization list differences are not allowed. If the saved object had an authorization list and the object exists on the system but does not have the same authorization list, the object is not restored. If the saved object had an authorization list and the object does not exist and it is being restored to a different system than the save system, the object is restored, but it is not linked to the authorization list, and the public authority is set to *EXCLUDE.
- *FILELVL
- File level id and member level id differences are allowed. An attempt will be made to restore existing physical files even though the physical file on the save media may have a different file level id or member level id than the physical file on the system. The physical file data will only be restored for those physical files whose format level identifiers on the save media match the format level identifiers of the corresponding physical file on the system.
If this value is not specified, file level id and member level id differences are not allowed. If an object already exists on the system with a different file level id or member level id than the saved object, the object is not restored.
- *OWNER
- Ownership differences are allowed. If an object already exists on the system with a different owner than the saved object, the object is restored with the owner of the object on the system.
If this value is not specified, ownership differences are not allowed. If an object already exists on the system with a different owner than the saved object, the object is not restored.
- *PGP
- Primary group differences are allowed. If an object already exists on the system with a different primary group than the saved object, the object is restored with the primary group of the object on the system.
If this value is not specified, primary group differences are not allowed. If an object already exists on the system with a different primary group than the saved object, the object is not restored.
Force object conversion (FRCOBJCVN)
Specifies whether to convert user objects to the format required for use in the current version of the operating system when the objects are restored.
Notes:
- This parameter applies only to user objects of the *MODULE, *PGM, *SRVPGM, and *SQLPKG object types.
- An object must have creation data (either observable or unobservable) to be converted.
- If an object needs to be converted (because it is formatted for an earlier version of the operating system), but is not converted during this restore operation, the object is automatically converted the first time it is used.
Single values
- *SYSVAL
- The objects are converted based on the value of the QFRCCVNRST system value.
- *NO
- The objects are not converted during the restore operation.
Note: If FRCOBJCVN(*NO) is specified, then the QFRCCVNRST system value must have a value of either "0" or "1".
Element 1: Convert during restore
- *YES
- The objects are converted during the restore operation.
Notes:
- If FRCOBJCVN(*YES *RQD) is specified, then the QFRCCVNRST system value must have a value of "0", "1", or "2". FRCOBJCVN(*YES *RQD) will override a QFRCCVNRST value of "0" or "1". If FRCOBJCVN(*YES *ALL) is specfied, then QFRCCVNRST can have any valid value and FRCOBJCVN(*YES *ALL) overrides the QFRCCVNRST system value.
- Specifying this value increases the time of the restore operation, but avoids the need to convert the objects when they are first used.
Element 2: Objects to convert
- *RQD
- The objects are converted only if they require conversion to be used by the current operating system. If the objects do not have all creation data (either observable or unobservable), the objects cannot be converted and will not be restored.
- *ALL
- All objects are converted regardless of their current format, including objects already in the current format. However, if the objects do not have all creation data (either observable or unobservable), the objects cannot be converted and will not be restored.
Restore to library (RSTLIB)
Specifies whether the objects are restored to a different library or to the same library where they were saved.
- *SAVLIB
- The objects are restored to the same library from which they were saved.
- name
- Specify the name of the library to which the saved objects are restored.
Output (OUTPUT)
Specifies whether a listing that shows information about the status of the objects is created and directed to an output file. The listing shows the restore information and shows all objects restored, not restored, and excluded. Information about each object's security is listed for the restored objects.
- *NONE
- No output is created.
- *PRINT
- The output is printed with the job's spooled output.
- *OUTFILE
- The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.
-
Note: You must specify a database file name for the OUTFILE parameter when OUTPUT(*OUTFILE) is specified.
Media definition (MEDDFN)
Specifies the media definition (*MEDDFN) object that identifies the devices and media used to restore the data. For information about creating and using a media definition, see the Backup and Recovery book, SC41-5304, and the Create Media Definition API in the System API Reference information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
If a media definition is specified, the VOL, SEQNBR, SAVF, and OPTFILE parameters cannot be specified. The volume identifiers and sequence numbers are specified in the media definition.
Qualifier 1: Media definition
- name
- Specify the name of the media definition to be used.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- name
- Specify the name of the library to be searched.
Optical file (OPTFILE)
Specifies the path name of the optical file that is used for the restore operation, beginning with the root directory of the volume.
For more information on specifying path names, refer to "Object naming rules" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
- *
- The system searches the root directory of the optical volume for the default name generated by the corresponding save operation.
- 'optical-directory-path-name/*'
- The system searches the specified directory of the optical volume for the default name generated by the corresponding save operation.
- 'optical-file-path-name'
- Specify the path name of the optical file.
Restore to ASP device (RSTASPDEV)
Specifies the auxiliary storage pool (ASP) device to which the data is to be restored.
Note: You can specify either the RSTASPDEV parameter or the RSTASP parameter, but not both.
- *SAVASPDEV
- The data is restored to the same ASP from which it was saved.
- name
- Specify the name of the ASP device to be used.
Restore to ASP number (RSTASP)
Specifies whether objects are restored to the auxiliary storage pool (ASP) from which they were saved or to the system ASP (ASP number 1) or to a basic user ASP (ASP numbers 2 through 32).
Some objects cannot be restored to user ASPs. More information about object types which can be restored to user ASPs is in the Backup and Recovery book, SC41-5304. If the library exists in, or is being restored to the system ASP, journals, journal receivers, and save files can be restored to basic user ASPs. All other object types will be restored to the ASP of the library.
ATTENTION: System or product libraries (libraries that begin with a Q or #) must not be created in or restored to a user ASP. Doing so can cause unpredictable results.
- *SAVASP
- The objects are restored to the ASP from which they were saved.
- 1-32
- Specifies the ASP number. When the specified ASP is 1, the specified objects are restored to the system ASP, and when the specified ASP is 2 through 32, the objects are restored to the basic user ASP specified.
File to receive output (OUTFILE)
Specifies the database file to which the information is directed when *OUTFILE is specified for the Output (OUTPUT) parameter. If the file does not exist, this command creates a database file in the specified library. If a new file is created, the system uses QASRRSTO in QSYS with the format name QSRRST as a model.
Qualifier 1: File to receive output
- name
- Specify the name of the database file to which output from the command is directed. If this file does not exist, it is created in the specified library.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the file. If no library is specified as the current library for the job, the QGPL library is used.
- name
- Specify the name of the library to be searched.
Output member options (OUTMBR)
Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the Output (OUTPUT) parameter.
Element 1: Member to receive output
- *FIRST
- The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter.
- name
- Specify the name of the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.
If the member exists, you can add records to the end of the existing member or clear the existing member and add the records.
Element 2: Replace or add records
- *REPLACE
- The existing records in the specified database file member are replaced by the new records.
- *ADD
- The new records are added to the existing information in the specified database file member.
Type of output information (INFTYPE)
Specifies the type of information which is printed or directed to the database file.
- *OBJ
- The list contains an entry for each object requested to be restored.
- *MBR
- The list contains an entry for each object, database file member, and spooled file requested to be restored.
Libraries to omit (OMITLIB)
Specifies a list of libraries to be excluded from the restore operation.
Single values
- *NONE
- No libraries are excluded from the restore operation.
Other values (up to 300 repetitions)
- generic-name
- Specify the generic name of the libraries to be excluded.
Note: A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, then all objects that have names with the same prefix as the generic object name are selected.
- library-name
- Specify the name of the library to be excluded from the restore operation.
Objects to omit (OMITOBJ)
Specifies the objects to be excluded from the operation. Up to 300 objects or generic object values can be specified.
Element 1: Object
-
Qualifier 1: Object
- *NONE
- No objects are excluded from the operation.
- *ALL
- All objects of the specified object type are excluded from the operation.
- generic-name
- Specify the generic name of the objects to be excluded.
Note: A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, then all objects that have names with the same prefix as the generic object name are selected.
- name
- Specify the name of the object to be excluded from the operation.
-
Qualifier 2: Library
- *ALL
- The specified objects are excluded from all libraries that are part of the operation.
- generic-name
- Specify the generic name of the libraries that contain objects to be excluded.
Note: A generic name is specified as a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, then all objects that have names with the same prefix as the generic object name are selected.
- name
- Specify the name of the library that contains the object to be excluded from the operation.
Element 2: Object type
- *ALL
- All object types are excluded from the operation, depending on the value specified for the object name.
- character-value
- Specify the object type of the objects to be excluded from the operation.
To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt). For a description of the object types, see "Object types" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Example 1: Restoring Most Recently Saved Version
RSTOBJ OBJ(PAYROLL) SAVLIB(LIBX) DEV(TAP01)
OBJTYPE(*PGM) VOL(*SAVVOL)
This command restores to LIBX the program named PAYROLL that was saved from LIBX. The tape drive named TAP01 is used to restore the most recently saved version of the program.
Example 2: Specifying Save Date and Time
RSTOBJ OBJ(PAY*) SAVLIB(LIBX) DEV(OPT01) VOL(ABCD)
OPTION(*OLD) SAVDATE(102202)
SAVTIME(143000) RSTLIB(LIBY)
All objects whose names start with PAY and that were saved from the library named LIBX on optical volume ABCD at 14:30:00 on 10/22/02 are restored to LIBY. Volume ABCD must be put on the optical device named OPT01. Because OPTION(*OLD) is specified, the only objects restored are those having the same object name and type both in LIBY on the system and in LIBX on the optical volume.
Example 3: Adding a New Program to the QGPL Library
RSTOBJ OBJ(NEWPROG) SAVLIB(QGPL) DEV(OPT01) OBJTYPE(*PGM)
VOL(PGMS) OPTION(*NEW) ALWOBJDIF(*AUTL)
A new program named NEWPROG is added to the general purpose library, QGPL. It is restored from a volume labeled PGMS that is inserted in the optical device named OPT01. If the object was saved on a different system and was linked to an authorization list, it will be linked to the authorization list with the same name on this system.
Example 4: Printing An Output List
RSTOBJ OBJ(*ALL) SAVLIB(LIB) DEV(TAP01) OBJTYPE(*PGM)
VOL(SVOL) SEQNBR(2) SAVDATE(082392)
SAVTIME(143000) OUTPUT(*PRINT)
All programs that were saved from the library named LIB that exist in the saved version on the tape volume named SVOL, sequence number 2, saved at 14:30:00 on 08/23/92, are restored to the library named LIB. An output list of all objects restored as well as objects not restored is provided.
Example 5: Restoring Journal Receivers
RSTOBJ OBJ(*ALL) SAVLIB(BACKUP) DEV(*SAVF)
OBJTYPE(*JRNRCV) SAVF(SAVEJ) RSTASP(3)
All journal receivers that were saved from the library named BACKUP into the save file named SAVEJ are restored to the library named BACKUP. The journal receivers are restored to basic user ASP 3 (unless they already exist in the library named BACKUP and are in a different ASP or ASP 3 contains a library).
*ESCAPE Messages
- CPF370C
- Not authorized to ALWOBJDIF parameter.
- CPF3705
- &2 &1 in &3 not journaled.
- CPF3706
- &2 &1 not restored to library &3.
- CPF3707
- Save file &1 in &2 contains no data.
- CPF3709
- Tape devices do not support same densities.
- CPF3727
- Duplicate device &1 specified on device name list.
- CPF3728
- Device &1 specified with other devices.
- CPF3730
- Not authorized to &2 &1 in library &3.
- CPF3731
- Cannot use &2 &1 in library &3.
- CPF3733
- &2 &1 in &3 previously damaged.
- CPF3738
- Device &1 used for save or restore is damaged.
- CPF3739
- Database file &1 member in &3 damaged.
- CPF374C
- No objects restored to ASP &2.
- CPF3743
- File cannot be restored, displayed, or listed.
- CPF3748
- Object information for library &1 damaged.
- CPF3767
- Device &1 not found.
- CPF3768
- Device &1 not valid for command.
- CPF3769
- File found on media not save/restore file.
- CPF3770
- No objects saved or restored for library &1.
- CPF3773
- &1 objects restored. &2 not restored to &4.
- CPF3780
- Specified file for library &1 not found.
- CPF3781
- Library &1 not found.
- CPF3782
- File &1 in &2 not a save file.
- CPF3783
- Cannot determine VOL(*SAVVOL) location. No objects restored.
- CPF3784
- Restore device specified in the DEV parameter does not match VOL(*SAVVOL) device.
- CPF3791
- While processing &2 &1 in &3, encountered end of file &4.
- CPF3793
- Machine or ASP storage limit reached.
- CPF3794
- Save or restore operation ended unsuccessfully.
- CPF3796
- Storage limit exceeded for user profile &4.
- CPF37A5
- RSTASP &1 is not online.
- CPF3805
- Objects from save file &1 in &2 not restored.
- CPF3807
- Data decompression error for save file &1 in &2.
- CPF3812
- Save file &1 in &2 in use.
- CPF384F
- &2 &1 not restored to library &3.
- CPF3867
- Contents of FILEMBR parameter not correct.
- CPF3868
- FILEMBR specified but OBJTYPE must be *ALL or *FILE.
- CPF3871
- No objects saved or restored; &3 objects not included.
- CPF3872
- &1 objects restored. &2 not restored to &4.
- CPF38A2
- ASP device &1 not correct.
- CPF38A6
- Only one library allowed with specified parameters.
- CPF5729
- Not able to allocate object &1.
- CPF9809
- Library &1 cannot be accessed.
- CPF9812
- File &1 in library &2 not found.
- CPF9814
- Device &1 not found.
- CPF9820
- Not authorized to use library &1.
- CPF9822
- Not authorized to file &1 in library &2.
- CPF9825
- Not authorized to device &1.
- CPF9829
- Auxiliary storage pool &1 not found.
- CPFB8ED
- Device description &1 not correct for operation.
- OPT1498
- Volume name list exhausted on device &1.
- OPT1502
- Attempted to process past the end of a multi-volume set.
- OPT1605
- Media or device error occurred.