ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/rstlib.htm

1544 lines
66 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Restore Library (RSTLIB)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="RSTLIB.Top_Of_Page"></a>
<h2>Restore Library (RSTLIB)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#RSTLIB.PARAMETERS.TABLE">Parameters</a><br>
<a href="#RSTLIB.COMMAND.EXAMPLES">Examples</a><br>
<a href="#RSTLIB.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="RSTLIB"></a>
<p>The Restore Library (RSTLIB) command restores to the system one library or a group of libraries that was saved by the Save Library (SAVLIB) command. The Restore Library (RSTLIB) command restores the whole library, which includes the library description, object descriptions, and contents of the objects in the library.
</p>
<p>For job queues, message queues, user queues, and logical files, only the object descriptions are restored, because only the definitions are saved. Also, logical file access paths may be restored if they were saved. 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 <b>Spooled file data (SPLFDTA)</b> parameter.
</p>
<p>This command can be used to restore libraries whose objects had their storage freed by the corresponding SAVLIB command of the restore operation, or libraries deleted by the Delete Library (DLTLIB) command. If the data portions of the objects in the saved libraries were not freed, each library is copied into the same area of storage that it previously occupied. If the storage was freed, the system finds the needed storage to store the library contents (the object description and data portion of every file, module, program, service program, Structured Query Language (SQL) package, and journal receiver in the library). If the library does not exist on the system because it has been deleted or is being restored on a different system, the system must find the storage for everything that is in the library, including the library description.
</p>
<p>When the owner profile does not exist on the system, the user profile of the system default owner (QDFTOWN) becomes the default owner of any object being restored in the system.
</p>
<p>If an object already exists in the library in which it is being restored, the public and private authorities of the existing object are retained. If the object does not exist in the library, all public authorities are restored, but private authorities must be granted again. For an existing output queue object that is actively spooling during the restore operation, or a data queue that already exists in the library, the object is not restored, and a diagnostic message is sent.
</p>
<p>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. Additionally, if the object is a library, the default auditing value for each object created in the library is restored if the library is being restored as new; otherwise, the default auditing value is restored from the media.
</p>
<p><b>Notes:</b>
</p>
<ol>
<li>To restore a save file to a library where it does not already exist, you must have *USE authority to the Create Save File (CRTSAVF) command.
</li>
<li>The RSTLIB command ignores all file overrides currently in effect for the job, except the overrides for the restore output file.
</li>
</ol>
<p><b>Restrictions:</b>
</p>
<ul>
<li>This command is shipped with no public authority (*EXCLUDE).
</li>
<li>You must have save system (*SAVSYS) special authority, or have all of the following object authorities:
<ol>
<li>Read (*READ) and add (*ADD) authorities for, or be the owner of, each library specified.
</li>
<li>Object existence (*OBJEXIST) authority for, or be the owner of, each object in the library 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 exist, add (*ADD) authority for the user profiles that own the objects to be restored. For spooled file data, *OBJEXIST authority is required for the output queue to which it is restored.
<p>If you do not have the correct authority for all the libraries and objects specified, only those for which you have authority are restored.
</p>
</li>
<li>If VOL(*SAVVOL) is specified, *USE authority to the saved-from library.
</li>
<li>*USE authority for the save file is required when restoring libraries from a save file. *USE authority for the device description and the device file are required when restoring libraries from a tape or optical device.
</li>
</ol>
</li>
<li>When using a media definition, you must have *USE authority to the media definition and execute (*EXECUTE) authority to the media definition library.
</li>
<li>When saving or restoring to an existing database file using the OUTFILE parameter, you must have *EXECUTE authority to the library where the output file is located.
</li>
<li>The current versions of programs on the system should not be run while the library that contains those programs is being restored. If any OPM program is running while it is being restored, the running program may fail or behave unpredictably.
</li>
</ul>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="RSTLIB.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.SAVLIB"><b>SAVLIB</b></a></td>
<td valign="top">Saved library</td>
<td valign="top">Single values: *NONSYS, *ALLUSR, *IBM, *ANY<br>Other values (up to 300 repetitions): <i>Generic name, name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.DEV"><b>DEV</b></a></td>
<td valign="top">Device</td>
<td valign="top">Single values: *SAVF, *MEDDFN<br>Other values (up to 4 repetitions): <i>Name</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.VOL"><b>VOL</b></a></td>
<td valign="top">Volume identifier</td>
<td valign="top">Single values: <b><u>*MOUNTED</u></b>, *SAVVOL<br>Other values (up to 75 repetitions): <i>Character value</i></td>
<td valign="top">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.SEQNBR"><b>SEQNBR</b></a></td>
<td valign="top">Sequence number</td>
<td valign="top">1-16777215, <b><u>*SEARCH</u></b></td>
<td valign="top">Optional, Positional 4</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.LABEL"><b>LABEL</b></a></td>
<td valign="top">Label</td>
<td valign="top"><i>Character value</i>, <b><u>*SAVLIB</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.ENDOPT"><b>ENDOPT</b></a></td>
<td valign="top">End of media option</td>
<td valign="top"><b><u>*REWIND</u></b>, *LEAVE, *UNLOAD</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.STRLIB"><b>STRLIB</b></a></td>
<td valign="top">Starting library</td>
<td valign="top"><i>Name</i>, <b><u>*FIRST</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#RSTLIB.SAVF"><b>SAVF</b></a></td>
<td valign="top">Save file</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Save file</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="3"><a href="#RSTLIB.MEDDFN"><b>MEDDFN</b></a></td>
<td valign="top">Media definition</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Media definition</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#RSTLIB.OPTFILE"><b>OPTFILE</b></a></td>
<td valign="top">Optical file</td>
<td valign="top"><i>Path name</i>, <b><u>*</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.OMITLIB"><b>OMITLIB</b></a></td>
<td valign="top">Libraries to omit</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values (up to 300 repetitions): <i>Generic name, name</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.OPTION"><b>OPTION</b></a></td>
<td valign="top">Option</td>
<td valign="top"><b><u>*ALL</u></b>, *NEW, *OLD, *FREE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.MBROPT"><b>MBROPT</b></a></td>
<td valign="top">Data base member option</td>
<td valign="top"><b><u>*MATCH</u></b>, *ALL, *NEW, *OLD</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.SPLFDTA"><b>SPLFDTA</b></a></td>
<td valign="top">Spooled file data</td>
<td valign="top"><b><u>*NEW</u></b>, *NONE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.SAVDATE"><b>SAVDATE</b></a></td>
<td valign="top">Date when saved</td>
<td valign="top"><i>Date</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.SAVTIME"><b>SAVTIME</b></a></td>
<td valign="top">Time when saved</td>
<td valign="top"><i>Time</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.ALWOBJDIF"><b>ALWOBJDIF</b></a></td>
<td valign="top">Allow object differences</td>
<td valign="top">Single values: <b><u>*NONE</u></b>, *ALL<br>Other values (up to 4 repetitions): *AUTL, *FILELVL, *OWNER, *PGP</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#RSTLIB.FRCOBJCVN"><b>FRCOBJCVN</b></a></td>
<td valign="top">Force object conversion</td>
<td valign="top">Single values: <b><u>*SYSVAL</u></b>, *NO<br>Other values: <i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Convert during restore</td>
<td valign="top">
<b><u>*YES</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Objects to convert</td>
<td valign="top">
<b><u>*RQD</u></b>, *ALL</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.RSTLIB"><b>RSTLIB</b></a></td>
<td valign="top">Restore to library</td>
<td valign="top"><i>Name</i>, <b><u>*SAVLIB</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.RSTASPDEV"><b>RSTASPDEV</b></a></td>
<td valign="top">Restore to ASP device</td>
<td valign="top"><i>Name</i>, <b><u>*SAVASPDEV</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.RSTASP"><b>RSTASP</b></a></td>
<td valign="top">Restore to ASP number</td>
<td valign="top">1-32, <b><u>*SAVASP</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.OUTPUT"><b>OUTPUT</b></a></td>
<td valign="top">Output</td>
<td valign="top"><b><u>*NONE</u></b>, *PRINT, *OUTFILE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#RSTLIB.OUTFILE"><b>OUTFILE</b></a></td>
<td valign="top">File to receive output</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: File to receive output</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="3"><a href="#RSTLIB.OUTMBR"><b>OUTMBR</b></a></td>
<td valign="top">Output member options</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Member to receive output</td>
<td valign="top">
<i>Name</i>, <b><u>*FIRST</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Replace or add records</td>
<td valign="top">
<b><u>*REPLACE</u></b>, *ADD</td>
</tr>
<tr>
<td valign="top"><a href="#RSTLIB.INFTYPE"><b>INFTYPE</b></a></td>
<td valign="top">Type of output information</td>
<td valign="top"><b><u>*OBJ</u></b>, *MBR</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="5"><a href="#RSTLIB.OMITOBJ"><b>OMITOBJ</b></a></td>
<td valign="top">Objects to omit</td>
<td valign="top">Values (up to 300 repetitions): <i>Element list</i></td>
<td valign="top" rowspan="5">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Object</td>
<td valign="top">
<i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Object</td>
<td valign="top"><i>Generic name, name</i>, <b><u>*NONE</u></b>, *ALL</td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Generic name, name</i>, <b><u>*ALL</u></b></td>
</tr><tr>
<td valign="top">Element 2: Object type</td>
<td valign="top">
<i>Character value</i>, <b><u>*ALL</u></b></td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="RSTLIB.SAVLIB"></a>
<h3>Saved library (SAVLIB)</h3>
<p>Specifies the libraries to be restored to the system.
</p>
<p><b>Notes:</b>
</p>
<ol>
<li>If you specify more than one library, or a special value, or a generic value:
<ul>
<li>The <b>Device (DEV)</b> parameter must not specify *SAVF.
</li>
<li>The <b>Restore to library (RSTLIB)</b> parameter must specify *SAVLIB.
</li>
<li>The <b>Label (LABEL)</b> parameter must specify *SAVLIB.
</li>
<li>The <b>Optical file (OPTFILE)</b> parameter must specify * or end with /*.
</li>
</ul>
</li>
<li>For values *NONSYS and *IBM, all other operations on the system must be ended before this option is specified. This requires ending all subsystems through the End Subsystem (ENDSBS) command or the End System (ENDSYS) command.
</li>
<li>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.
</li>
</ol>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*NONSYS</b></dt>
<dd>Libraries saved by the Save Library (SAVLIB) command with LIB(*NONSYS) specified are restored.
<p>You can do a RSTLIB SAVLIB(*IBM) and a RSTLIB SAVLIB(*ALLUSR) from a SAVLIB LIB(*NONSYS).
</p>
</dd>
<dt><b>*ALLUSR</b></dt>
<dd>All user libraries are restored. All libraries with names that do not begin with the letter Q are restored except for the following:
<p>
<pre>
#CGULIB #DSULIB #SEULIB
#COBLIB #RPGLIB
#DFULIB #SDALIB
</pre>
</p>
<p>Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered "user libraries", and are also restored:
</p>
<p>
<pre>
QDSNX QRCLxxxxx QUSRIJS QUSRVxRxMx
QGPL QSRVAGT QUSRINFSKR
QGPL38 QSYS2 QUSRNOTES
QMGTC QSYS2xxxxx QUSROND
QMGTC2 QS36F QUSRPOSGS
QMPGDATA QUSER38 QUSRPOSSA
QMQMDATA QUSRADSM QUSRPYMSVR
QMQMPROC QUSRBRM QUSRRDARS
QPFRDATA QUSRDIRCL QUSRSYS
QRCL QUSRDIRDB QUSRVI
</pre>
</p>
</dd>
<dt><b>*IBM</b></dt>
<dd>Restores all IBM-supplied libraries except for the following:
<p>
<pre>
QDOC QRCYxxxxx QTEMP QUSRRDARS
QDOCxxxx QRECOVERY QUSER38 QUSRSYS
QDSNX QRPLOBJ QUSRADSM QUSRVI
QGPL QRPLxxxxx QUSRBRM QUSRVxRxMx
QGPL38 QSPL QUSRDIRCL
QMGTC QSPLxxxx QUSRDIRDB
QMGTC2 QSRV QUSRIJS
QMPGDATA QSRVAGT QUSRINFSKR
QMQMDATA QSYS QUSRNOTES
QMQMPROC QSYSxxxxx QUSROND
QPFRDATA QSYS2 QUSRPOSGS
QRCL QSYS2xxxxx QUSRPOSSA
QRCLxxxxx QS36F QUSRPYMSVR
</pre>
</p>
<p>
<b>Note: </b>A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
</p>
<p>The following libraries with names that do not begin with the letter Q are also restored:
</p>
<p>
<pre>
#CGULIB #DSULIB #SEULIB
#COBLIB #RPGLIB
#DFULIB #SDALIB
</pre>
</p>
</dd>
<dt><b>*ANY</b></dt>
<dd>Restores the first version of all saved libraries found on the tape beginning with the sequence number specified for the <b>Sequence number (SEQNBR)</b> parameter, or restores all saved libraries found on the optical media in the directory specified for the <b>Optical file (OPTFILE)</b> parameter.
</dd>
</dl>
<p><b>Other values (up to 300 repetitions)</b>
</p>
<dl>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify the generic name of the library to be restored.
<p>
<b>Note: </b>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.
</p>
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be restored. The name of the library being restored must be the same as the name that was used when the library was saved.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.DEV"></a>
<h3>Device (DEV)</h3>
<p>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.
</p>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*SAVF</b></dt>
<dd>The restore operation is done using the save file specified for the <b>Save file (SAVF)</b> parameter.
</dd>
</dl>
<dl>
<dt><b>*MEDDFN</b></dt>
<dd>The restore operation is done using the devices and media identified in the media definition specified for the <b>Media definition (MEDDFN)</b> parameter.
</dd>
</dl>
<p><b>Other values</b>
</p>
<dl>
<dt><b><i>optical-device-name</i></b></dt>
<dd>Specify the name of the optical device used for the restore operation.
</dd>
</dl>
<dl>
<dt><b><i>tape-media-library-device-name</i></b></dt>
<dd>Specify the name of the tape media library device used for the restore operation.
</dd>
</dl>
<dl>
<dt><b><i>tape-device-name</i></b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.VOL"></a>
<h3>Volume identifier (VOL)</h3>
<p>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.
</p>
<p>
<b>Note: </b>The first version of the saved library that is found on the media is restored, unless a specific version is identified by the <b>Date when saved (SAVDATE)</b> and <b>Time when saved (SAVTIME)</b> parameters or, for tape, the <b>Sequence number (SEQNBR)</b> parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*MOUNTED</u></b></dt>
<dd>The objects are restored from the volumes placed in the device specified for the <b>Device (DEV)</b> 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.
<p>
<b>Note: </b>This value cannot be specified when using an optical media library device.
</p>
</dd>
</dl>
<dl>
<dt><b>*SAVVOL</b></dt>
<dd>The system, by using the save or restore history information, determines which volumes contain the most recently saved version of the library. If the device type of the device specified for the <b>Device DEV)</b> parameter does not match the device type of the most recently saved version of the library, an error message is sent to the user, and the function is ended. If *SAVVOL is specified, the SAVDATE and SAVTIME parameters cannot be specified. If *SAVVOL is specified, *SEARCH must be specified for the SEQNBR parameter.
</dd>
</dl>
<p><b>Other values (up to 75 repetitions)</b>
</p>
<dl>
<dt><b><i>character-value</i></b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.SEQNBR"></a>
<h3>Sequence number (SEQNBR)</h3>
<p>Specifies, when tape is used, which sequence number is used for the restore operation.
</p>
<dl>
<dt><b><u>*SEARCH</u></b></dt>
<dd>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 <b>End of tape option (ENDOPT)</b> 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 <b>End of tape option (ENDOPT)</b> 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.
</dd>
<dt><b><i>1-16777215</i></b></dt>
<dd>Specify the sequence number of the file to be used for the restore operation.
</dd>
</dl>
<p>If *NONSYS, *ALLUSR, or *IBM is specified for the <b>Saved library (SAVLIB)</b> parameter, the sequence number specifies the location of the file QFILE. The QFILE file is at the beginning of the *NONSYS, *ALLUSR, or *IBM save operation. The QFILE file contains the list of libraries saved.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.LABEL"></a>
<h3>Label (LABEL)</h3>
<p>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.
</p>
<dl>
<dt><b><u>*SAVLIB</u></b></dt>
<dd>The file label is the name specified for the <b>Saved library (SAVLIB)</b> parameter.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.ENDOPT"></a>
<h3>End of media option (ENDOPT)</h3>
<p>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.
</p>
<p>
<b>Note: </b>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.
</p>
<dl>
<dt><b><u>*REWIND</u></b></dt>
<dd>The tape is automatically rewound, but not unloaded, after the operation has ended.
</dd>
</dl>
<dl>
<dt><b>*LEAVE</b></dt>
<dd>The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
</dd>
</dl>
<dl>
<dt><b>*UNLOAD</b></dt>
<dd>The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.STRLIB"></a>
<h3>Starting library (STRLIB)</h3>
<p>Specifies the name of the starting library for a *NONSYS, *IBM, or *ALLUSR restore operation.
</p>
<p>If an unrecoverable media error occurs during the restore operation, this parameter can be used to restart the operation.
</p>
<p>
<b>Note: </b>In the recovery steps that follow, *NONSYS is specified for the <b>Saved library (SAVLIB)</b> parameter of this command. If you are restoring IBM-supplied libraries or all user-created libraries and IBM-supplied libraries, specify *IBM or *ALLUSR instead.
</p>
<p>The basic recovery steps for a restore operation are:
</p>
<ol>
<li>Look at the job log to determine the library where the previous restore library (RSTLIB SAVLIB(*NONSYS)) command failed. Find the last library restored, which is indicated by a successful restore completion message.
</li>
<li>Load the first tape of the SAVLIB LIB(*NONSYS) media.
</li>
<li>Type the following command, and then press the Enter key:
<p>
<pre>
RSTLIB SAVLIB(*NONSYS) DEV(TAP01) ENDOPT(*LEAVE)
STRLIB(library-name) OMITLIB(library-name)
</pre>
</p>
<p>where the <i>library-name</i> for the STRLIB and OMITLIB parameters is the library where the last RSTLIB failed. This starts the restore operation on the library after the library where the restore operation failed.
</p>
</li>
<li>When you are prompted, load the volume containing the starting library.
</li>
<li>After the restore operation is complete, restore the library where the restore operation failed using the media from a previous save operation.
<p>
<b>Note: </b>Consider removing the tape with the media error from the next save rotation cycle to avoid another tape error.
</p>
</li>
</ol>
<p>
<b>Note: </b>This parameter is valid only if *NONSYS, *IBM, or *ALLUSR is specified for the SAVLIB parameter.
</p>
<dl>
<dt><b><u>*FIRST</u></b></dt>
<dd>The restore operation begins with the first library saved.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library with which to start the restore operation.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.SAVF"></a>
<h3>Save file (SAVF)</h3>
<p>Specifies the save file used to restore the data.
</p>
<p>
<b>Note: </b>A value must be specified for this parameter if *SAVF is specified for the <b>Device (DEV)</b> parameter.
</p>
<p><b>Qualifier 1: Save file</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of save file to be used.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>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.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the save file is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.MEDDFN"></a>
<h3>Media definition (MEDDFN)</h3>
<p>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.
</p>
<p>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.
</p>
<p><b>Qualifier 1: Media definition</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the media definition to be used.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>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.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OPTFILE"></a>
<h3>Optical file (OPTFILE)</h3>
<p>Specifies the path name of the optical file that is used for the restore operation, beginning with the root directory of the volume.
</p>
<p>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.
</p>
<dl>
<dt><b><u>*</u></b></dt>
<dd>The system searches the root directory of the optical volume for the default name generated by the corresponding save operation.
</dd>
<dt><b><i>'optical-directory-path-name/*'</i></b></dt>
<dd>The system searches the specified directory of the optical volume for the default name generated by the corresponding save operation.
</dd>
</dl>
<dl>
<dt><b><i>'optical-file-path-name'</i></b></dt>
<dd>Specify the path name of the optical file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OMITLIB"></a>
<h3>Libraries to omit (OMITLIB)</h3>
<p>Specifies a list of libraries to be excluded from the restore operation.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No libraries are excluded from the restore operation.
</dd>
</dl>
<p><b>Other values (up to 300 repetitions)</b>
</p>
<dl>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify the generic name of the libraries to be excluded.
<p>
<b>Note: </b>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.
</p>
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library to be excluded from the restore operation.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OPTION"></a>
<h3>Option (OPTION)</h3>
<p>Specifies how to handle restoring each object.
</p>
<dl>
<dt><b><u>*ALL</u></b></dt>
<dd>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.
</dd>
<dt><b>*NEW</b></dt>
<dd>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.
</dd>
<dt><b>*OLD</b></dt>
<dd>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.
</dd>
<dt><b>*FREE</b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.MBROPT"></a>
<h3>Data base member option (MBROPT)</h3>
<p>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.
</p>
<dl>
<dt><b><u>*MATCH</u></b></dt>
<dd>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 <b>Allow object differences (ALWOBJDIF)</b> parameter.
</dd>
<dt><b>*ALL</b></dt>
<dd>All members in the saved file are restored.
</dd>
<dt><b>*NEW</b></dt>
<dd>Only new members (members not known to the system) are restored.
</dd>
<dt><b>*OLD</b></dt>
<dd>Only members already known to the system are restored.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.SPLFDTA"></a>
<h3>Spooled file data (SPLFDTA)</h3>
<p>Specifies whether to restore spooled file data and attributes.
</p>
<dl>
<dt><b><u>*NEW</u></b></dt>
<dd>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.
</dd>
<dt><b>*NONE</b></dt>
<dd>No spooled file data is restored.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.SAVDATE"></a>
<h3>Date when saved (SAVDATE)</h3>
<p>Specifies the date when the library was saved. If the most recently saved version is not restored, or if more than one saved version is on the volumes, type the date that specifies which version of the library is restored.
</p>
<p>If a volume identifier or *MOUNTED is specified for the <b>Volume identifier (VOL)</b> parameter, but this parameter is not specified, the first version of the library found on the volume is restored. This parameter is not valid with VOL(*SAVVOL).
</p>
<dl>
<dt><b><i>date</i></b></dt>
<dd>Specify the date that the library to be restored was saved. The date must be entered in the job date format.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.SAVTIME"></a>
<h3>Time when saved (SAVTIME)</h3>
<p>Specifies the time when the library was saved, if the current version is not restored.
</p>
<p>If a volume identifier or *MOUNTED is specified for the <b>Volume identifier (VOL)</b> parameter, but this parameter is not, the first version of the library found on the volume is restored. This parameter is valid only if the <b>Date when saved (SAVDATE)</b> parameter is also specified.
</p>
<dl>
<dt><b><i>time</i></b></dt>
<dd>Specify the time that the library to be restored was saved. The time can be specified with or without a time separator:
<ul>
<li>Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds.
</li>
<li>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.
</li>
</ul>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.ALWOBJDIF"></a>
<h3>Allow object differences (ALWOBJDIF)</h3>
<p>Specifies whether differences are allowed between the saved objects and the restored objects.
</p>
<p><b>Notes:</b>
</p>
<ol>
<li>You must have all object (*ALLOBJ) special authority to specify any value other than *NONE for this parameter.
</li>
<li>If differences are found, the final message for the restore operation is an escape message rather than the normal completion message.
</li>
</ol>
<p>The types of differences include:
</p>
<ul>
<li>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.
<p>
<b>Note: </b>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.
</p>
</li>
</ul>
<ul>
<li>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.
</li>
</ul>
<ul>
<li>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.
</li>
</ul>
<ul>
<li>Ownership: The owner of an object on the system is different than the owner of an object from the save operation.
</li>
</ul>
<ul>
<li>Primary Group: The primary group of an object on the system is different than the primary group of an object from the save operation.
</li>
</ul>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>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.
</dd>
</dl>
<dl>
<dt><b>*ALL</b></dt>
<dd>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 <b>Data base member option (MBROPT)</b> 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.
</dd>
</dl>
<p><b>Other values (up to 4 repetitions)</b>
</p>
<dl>
<dt><b>*AUTL</b></dt>
<dd>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.
<p>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.
</p>
</dd>
</dl>
<dl>
<dt><b>*FILELVL</b></dt>
<dd>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.
<p>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.
</p>
</dd>
</dl>
<dl>
<dt><b>*OWNER</b></dt>
<dd>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.
<p>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.
</p>
</dd>
</dl>
<dl>
<dt><b>*PGP</b></dt>
<dd>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.
<p>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.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.FRCOBJCVN"></a>
<h3>Force object conversion (FRCOBJCVN)</h3>
<p>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.
</p>
<p><b>Notes:</b>
</p>
<ol>
<li>This parameter applies only to user objects of the *MODULE, *PGM, *SRVPGM, and *SQLPKG object types.
</li>
<li>An object must have creation data (either observable or unobservable) to be converted.
</li>
<li>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.
</li>
</ol>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*SYSVAL</u></b></dt>
<dd>The objects are converted based on the value of the QFRCCVNRST system value.
</dd>
<dt><b>*NO</b></dt>
<dd>The objects are not converted during the restore operation.
<p>
<b>Note: </b>If FRCOBJCVN(*NO) is specified, then the QFRCCVNRST system value must have a value of either "0" or "1".
</p>
</dd>
</dl>
<p><b>Element 1: Convert during restore</b>
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>The objects are converted during the restore operation.
<p><b>Notes:</b>
</p>
<ol>
<li>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.
</li>
<li>Specifying this value increases the time of the restore operation, but avoids the need to convert the objects when they are first used.
</li>
</ol>
</dd>
</dl>
<p><b>Element 2: Objects to convert</b>
</p>
<dl>
<dt><b><u>*RQD</u></b></dt>
<dd>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.
</dd>
<dt><b>*ALL</b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.RSTLIB"></a>
<h3>Restore to library (RSTLIB)</h3>
<p>Specifies whether the library contents are restored to the same library in which they were saved, or to a different library.
</p>
<dl>
<dt><b><u>*SAVLIB</u></b></dt>
<dd>The library contents are restored to the same library or libraries in which they were saved.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the saved library contents are restored. If *NONSYS, *IBM, or *ALLUSR is specified for the <b>Saved library (SAVLIB)</b> parameter, a library name cannot be specified for this parameter.
<p>
<b>Note: </b>If a Structured Query Language (SQL) database is restored to a library other than the one in which it was saved, the journals are not restored.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.RSTASPDEV"></a>
<h3>Restore to ASP device (RSTASPDEV)</h3>
<p>Specifies the auxiliary storage pool (ASP) device to which the data is to be restored.
</p>
<p>
<b>Note: </b>You can specify either the RSTASPDEV parameter or the RSTASP parameter, but not both.
</p>
<dl>
<dt><b><u>*SAVASPDEV</u></b></dt>
<dd>The data is restored to the same ASP from which it was saved.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the ASP device to be used.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.RSTASP"></a>
<h3>Restore to ASP number (RSTASP)</h3>
<p>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).
</p>
<p>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.
</p>
<p><b>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.</b>
</p>
<dl>
<dt><b><u>*SAVASP</u></b></dt>
<dd>The objects are restored to the ASP from which they were saved.
</dd>
<dt><b><i>1-32</i></b></dt>
<dd>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.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OUTPUT"></a>
<h3>Output (OUTPUT)</h3>
<p>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.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No output is created.
</dd>
</dl>
<dl>
<dt><b>*PRINT</b></dt>
<dd>The output is printed with the job's spooled output.
</dd>
</dl>
<dl>
<dt><b>*OUTFILE</b></dt>
<dd>The output is directed to the database file specified for the <b>File to receive output (OUTFILE)</b> parameter.
</dd>
</dl>
<dl>
<dt><b></b></dt>
<dd>
<p>
<b>Note: </b>You must specify a database file name for the OUTFILE parameter when OUTPUT(*OUTFILE) is specified.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OUTFILE"></a>
<h3>File to receive output (OUTFILE)</h3>
<p>Specifies the database file to which the information is directed when *OUTFILE is specified for the <b>Output (OUTPUT)</b> 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.
</p>
<p><b>Qualifier 1: File to receive output</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>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.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>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.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OUTMBR"></a>
<h3>Output member options (OUTMBR)</h3>
<p>Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the <b>Output (OUTPUT)</b> parameter.
</p>
<p><b>Element 1: Member to receive output</b>
</p>
<dl>
<dt><b><u>*FIRST</u></b></dt>
<dd>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 <b>File to receive output (OUTFILE)</b> parameter.
</dd>
<dt><b><i>name</i></b></dt>
<dd>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.
<p>If the member exists, you can add records to the end of the existing member or clear the existing member and add the records.
</p>
</dd>
</dl>
<p><b>Element 2: Replace or add records</b>
</p>
<dl>
<dt><b><u>*REPLACE</u></b></dt>
<dd>The existing records in the specified database file member are replaced by the new records.
</dd>
<dt><b>*ADD</b></dt>
<dd>The new records are added to the existing information in the specified database file member.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.INFTYPE"></a>
<h3>Type of output information (INFTYPE)</h3>
<p>Specifies the type of information which is printed or directed to the database file.
</p>
<dl>
<dt><b><u>*OBJ</u></b></dt>
<dd>The list contains an entry for each object requested to be restored.
</dd>
<dt><b>*MBR</b></dt>
<dd>The list contains an entry for each object, database file member, and spooled file requested to be restored.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="RSTLIB.OMITOBJ"></a>
<h3>Objects to omit (OMITOBJ)</h3>
<p>Specifies the objects to be excluded from the operation. Up to 300 objects or generic object values can be specified.
</p>
<p><b>Element 1: Object</b>
</p>
<dl>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 1: Object</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No objects are excluded from the operation.
</dd>
<dt><b>*ALL</b></dt>
<dd>All objects of the specified object type are excluded from the operation.
</dd>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify the generic name of the objects to be excluded.
<p>
<b>Note: </b>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.
</p>
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the object to be excluded from the operation.
</dd>
</dl>
</dd>
</dl>
<dl>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*ALL</u></b></dt>
<dd>The specified objects are excluded from all libraries that are part of the operation.
</dd>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify the generic name of the libraries that contain objects to be excluded.
<p>
<b>Note: </b>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.
</p>
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library that contains the object to be excluded from the operation.
</dd>
</dl>
</dd>
</dl>
<p><b>Element 2: Object type</b>
</p>
<dl>
<dt><b><u>*ALL</u></b></dt>
<dd>All object types are excluded from the operation, depending on the value specified for the object name.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the object type of the objects to be excluded from the operation.
<p>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.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RSTLIB.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Restoring New Objects</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(JOE) DEV(TAP01) OPTION(*NEW)
</pre>
</p>
<p>This command restores the saved version of library JOE from tape device TAP01. The only objects that are restored in the library are new objects (ones that were in the library when they were saved and later deleted).
</p>
<p><b>Example 2: Printing Output</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(*NONSYS) DEV(TAP01) OUTPUT(*PRINT)
</pre>
</p>
<p>This command restores all the saved nonsystem libraries to the system from tape. The contents of the libraries are restored exactly as they were saved. New objects (on tape) are added to the system; old objects in the system are overlaid by the version of the old objects on tape. Because OUTPUT(*PRINT) is specified, a printout of all objects (restored and not restored) for each library, is sent to the printer with the job's spooled output. Each library after the first library starts on a new page. After each library, a completion message states how many objects were restored and how many were not restored. At the end of a list, a final completion message states how many libraries were restored and how many were not restored.
</p>
<p><b>Example 3: Specifying Where the Restore Operation Begins</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(*NONSYS) DEV(TAP01) STRLIB(MIKESLIB)
</pre>
</p>
<p>This command restores the saved nonsystem libraries beginning with library MIKESLIB from the tape device, TAP01. The <i>first</i> tape of the nonsystem save must be loaded. An inquiry message instructs the user to load the tape containing MIKESLIB. If necessary, the same message is sent until the tape containing MIKESLIB is found.
</p>
<p><b>Example 4: Restoring a Version From a Specific Date and Time</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(PAYROLL) DEV(TAP01) SAVDATE(060193)
SAVTIME(103214) RSTLIB(OLDPAY) VOL(PAY)
</pre>
</p>
<p>This command restores the version of the PAYROLL library from the device TAP01, whose volume identifier is PAY. The version to be restored was saved at 10:32:14 on the date 06/01/93. All of the objects in the saved PAYROLL library are restored to the library OLDPAY. All new files are restored. Old files are restored only if the member lists of the files on the tape match the member lists of the files on the system.
</p>
<p><b>Example 5: Restoring From Multiple Tape Volumes</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(QGPL) DEV(TAP01) VOL(QGPL QGPL)
</pre>
</p>
<p>This command restores the QGPL library from two tape volumes both named QGPL. Even though the volume identifiers are the same, they must both be specified.
</p>
<p><b>Example 6: Restoring From Multiple Tape Devices Serially</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(USRLIB) DEV(TAP01 TAP02 TAP03)
VOL(USRA USRB USRC USRD) ENDOPT(*UNLOAD)
</pre>
</p>
<p>This command restores library USRLIB from four volumes on three tape devices. Volume USRA is put on tape device TAP01, volume USRB on TAP02, volume USRC on TAP03, and volume USRD on TAP01. The operator removes volume USRA from TAP01, so that TAP01 can be used by volume USRD. If the tape volumes are put in the wrong order, an error message is sent to the system operator message queue.
</p>
<p><b>Example 7: Restoring From Multiple Devices in Parallel</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(USRLIB) DEV(*MEDDFN) MEDDFN(LIBA/MEDDFNA)
</pre>
</p>
<p>This command restores library USRLIB using the devices and volumes specified in the media definition named MEDDFNA in library LIBA. For information about creating and using a media definition, see the <b>Backup, Recovery, and Availability</b> topic in the Information Center.
</p>
<p><b>Example 8: Restoring a Specific Version</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(LIB1) DEV(TAP01) MBROPT(*ALL)
SAVDATE(082392) SAVTIME(123251)
RSTLIB(LIB2) OUTPUT(*PRINT)
</pre>
</p>
<p>This command restores the version of library LIB1 from the device TAP01. The version to be restored was saved at 12:32:51 on the date 08/23/92. All of the objects in the saved library LIB1 are restored to library LIB2. A list of restored objects and those not restored is given. All files and file members are restored.
</p>
<p><b>Example 9: Restoring a Library From a Save File</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1)
</pre>
</p>
<p>This command restores library LIB1 from the save file SAVF1.
</p>
<p><b>Example 10: Restoring to a Basic User ASP</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1) RSTASP(2)
</pre>
</p>
<p>This command restores the library named LIB1 from the save file named SAVF1. The library and all objects in the saved version of LIB1 are restored to basic user auxiliary storage pool (ASP) 2 unless:
</p>
<ul>
<li>The library already exists in a different ASP.
</li>
<li>ASP 2 contains a journal, journal receiver, or SAVF which is part of a library in the system ASP.
</li>
<li>ASP 2 does not exist on the system.
</li>
<li>There are object types in the library which cannot be restored to user ASPs. These objects will not be restored.
</li>
</ul>
<p><b>Example 11: Restoring to an Independent ASP</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(LIB1) DEV(*SAVF) SAVF(SAVF1)
RSTASPDEV(DIVISION1)
</pre>
</p>
<p>This command restores the library named LIB1 from the save file named SAVF1. The library and all objects in the saved version of LIB1 are restored to the independent ASP named DIVISION1 unless:
</p>
<ul>
<li>The library already exists in the system ASP, a basic user ASP, or a different independent ASP in the same linked ASP group as DIVISION1.
</li>
<li>ASP DIVISION1 is not available on the system.
</li>
<li>There are object types in the library which cannot be restored to independent ASPs. These objects will not be restored.
</li>
</ul>
<p><b>Example 12: Restoring More Than One Library From Tape</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(*ANY) DEV(TAP01) SEQNBR(75)
</pre>
</p>
<p>This command restores the first saved version of each library from tape device TAP01 starting at tape file sequence number 75.
</p>
<p><b>Example 13: Restoring More Than One Library From Optical</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(A* B*) DEV(OPT01) OPTFILE('/BACKUP/*')
</pre>
</p>
<p>This command restores all libraries whose names start with A or B that are found in directory BACKUP on the optical volume in device OPT01.
</p>
<p><b>Example 14: Restoring Spooled Files</b>
</p>
<p>
<pre>
RSTLIB SAVLIB(JOE) DEV(TAP01) SPLFDTA(*NEW)
</pre>
</p>
<p>This command restores the saved version of library JOE from tape device TAP01. Any spooled files that do not currently exist on the system and that were saved with output queues in this library are restored.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="RSTLIB.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF370C</b></dt>
<dd>Not authorized to ALWOBJDIF parameter.
</dd>
<dt><b>CPF3705</b></dt>
<dd>&amp;2 &amp;1 in &amp;3 not journaled.
</dd>
<dt><b>CPF3706</b></dt>
<dd>&amp;2 &amp;1 not restored to library &amp;3.
</dd>
<dt><b>CPF3707</b></dt>
<dd>Save file &amp;1 in &amp;2 contains no data.
</dd>
<dt><b>CPF3709</b></dt>
<dd>Tape devices do not support same densities.
</dd>
<dt><b>CPF372C</b></dt>
<dd>Library &amp;1 not restored to ASP &amp;2.
</dd>
<dt><b>CPF3727</b></dt>
<dd>Duplicate device &amp;1 specified on device name list.
</dd>
<dt><b>CPF3728</b></dt>
<dd>Device &amp;1 specified with other devices.
</dd>
<dt><b>CPF373E</b></dt>
<dd>Library &amp;1 not restored to ASP &amp;2.
</dd>
<dt><b>CPF3730</b></dt>
<dd>Not authorized to &amp;2 &amp;1 in library &amp;3.
</dd>
<dt><b>CPF3731</b></dt>
<dd>Cannot use &amp;2 &amp;1 in library &amp;3.
</dd>
<dt><b>CPF3732</b></dt>
<dd>&amp;2 &amp;1 status error during restore operation.
</dd>
<dt><b>CPF3733</b></dt>
<dd>&amp;2 &amp;1 in &amp;3 previously damaged.
</dd>
<dt><b>CPF3738</b></dt>
<dd>Device &amp;1 used for save or restore is damaged.
</dd>
<dt><b>CPF3739</b></dt>
<dd>Database file &amp;1 member in &amp;3 damaged.
</dd>
<dt><b>CPF3740</b></dt>
<dd>Object &amp;1 type &amp;2 in &amp;3 not found.
</dd>
<dt><b>CPF3743</b></dt>
<dd>File cannot be restored, displayed, or listed.
</dd>
<dt><b>CPF3748</b></dt>
<dd>Object information for library &amp;1 damaged.
</dd>
<dt><b>CPF375F</b></dt>
<dd>File not selected. Cannot restore from save type file &amp;1.
</dd>
<dt><b>CPF3752</b></dt>
<dd>No record of save operation exists for library &amp;1.
</dd>
<dt><b>CPF3757</b></dt>
<dd>&amp;2 &amp;1 not restored to &amp;3.
</dd>
<dt><b>CPF3758</b></dt>
<dd>&amp;2 &amp;1 not restored to &amp;3.
</dd>
<dt><b>CPF376B</b></dt>
<dd>File &amp;1 not found.
</dd>
<dt><b>CPF3767</b></dt>
<dd>Device &amp;1 not found.
</dd>
<dt><b>CPF3768</b></dt>
<dd>Device &amp;1 not valid for command.
</dd>
<dt><b>CPF3769</b></dt>
<dd>File found on media not save/restore file.
</dd>
<dt><b>CPF3770</b></dt>
<dd>No objects saved or restored for library &amp;1.
</dd>
<dt><b>CPF3773</b></dt>
<dd>&amp;1 objects restored. &amp;2 not restored to &amp;4.
</dd>
<dt><b>CPF3779</b></dt>
<dd>&amp;1 libraries restored; &amp;4 partially restored; &amp;2 not restored.
</dd>
<dt><b>CPF378B</b></dt>
<dd>Library &amp;1 not created.
</dd>
<dt><b>CPF3780</b></dt>
<dd>Specified file for library &amp;1 not found.
</dd>
<dt><b>CPF3782</b></dt>
<dd>File &amp;1 in &amp;2 not a save file.
</dd>
<dt><b>CPF3783</b></dt>
<dd>Cannot determine VOL(*SAVVOL) location. No objects restored.
</dd>
<dt><b>CPF3784</b></dt>
<dd>Restore device specified in the DEV parameter does not match VOL(*SAVVOL) device.
</dd>
<dt><b>CPF3785</b></dt>
<dd>Not all subsystems ended.
</dd>
<dt><b>CPF3791</b></dt>
<dd>While processing &amp;2 &amp;1 in &amp;3, encountered end of file &amp;4.
</dd>
<dt><b>CPF3793</b></dt>
<dd>Machine or ASP storage limit reached.
</dd>
<dt><b>CPF3794</b></dt>
<dd>Save or restore operation ended unsuccessfully.
</dd>
<dt><b>CPF3796</b></dt>
<dd>Storage limit exceeded for user profile &amp;4.
</dd>
<dt><b>CPF37A5</b></dt>
<dd>RSTASP &amp;1 is not online.
</dd>
<dt><b>CPF380E</b></dt>
<dd>User profile &amp;1 not restored. Not able to create UID or GID.
</dd>
<dt><b>CPF3805</b></dt>
<dd>Objects from save file &amp;1 in &amp;2 not restored.
</dd>
<dt><b>CPF3807</b></dt>
<dd>Data decompression error for save file &amp;1 in &amp;2.
</dd>
<dt><b>CPF3812</b></dt>
<dd>Save file &amp;1 in &amp;2 in use.
</dd>
<dt><b>CPF3818</b></dt>
<dd>Starting library &amp;1 not found.
</dd>
<dt><b>CPF384F</b></dt>
<dd>&amp;2 &amp;1 not restored to library &amp;3.
</dd>
<dt><b>CPF3894</b></dt>
<dd>Cancel reply received for message &amp;1.
</dd>
<dt><b>CPF38A2</b></dt>
<dd>ASP device &amp;1 not correct.
</dd>
<dt><b>CPF38A6</b></dt>
<dd>Only one library allowed with specified parameters.
</dd>
<dt><b>CPF5729</b></dt>
<dd>Not able to allocate object &amp;1.
</dd>
<dt><b>CPF9809</b></dt>
<dd>Library &amp;1 cannot be accessed.
</dd>
<dt><b>CPF9812</b></dt>
<dd>File &amp;1 in library &amp;2 not found.
</dd>
<dt><b>CPF9814</b></dt>
<dd>Device &amp;1 not found.
</dd>
<dt><b>CPF9820</b></dt>
<dd>Not authorized to use library &amp;1.
</dd>
<dt><b>CPF9822</b></dt>
<dd>Not authorized to file &amp;1 in library &amp;2.
</dd>
<dt><b>CPF9825</b></dt>
<dd>Not authorized to device &amp;1.
</dd>
<dt><b>CPF9829</b></dt>
<dd>Auxiliary storage pool &amp;1 not found.
</dd>
<dt><b>CPFB8ED</b></dt>
<dd>Device description &amp;1 not correct for operation.
</dd>
<dt><b>OPT1498</b></dt>
<dd>Volume name list exhausted on device &amp;1.
</dd>
<dt><b>OPT1502</b></dt>
<dd>Attempted to process past the end of a multi-volume set.
</dd>
<dt><b>OPT1605</b></dt>
<dd>Media or device error occurred.
</dd>
</dl>
<p><b><u>*STATUS Messages</u></b>
</p>
<dl>
<dt><b>CPF3770</b></dt>
<dd>No objects saved or restored for library &amp;1.
</dd>
<dt><b>CPF3773</b></dt>
<dd>&amp;1 objects restored. &amp;2 not restored to &amp;4.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#RSTLIB.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>