326 lines
13 KiB
HTML
326 lines
13 KiB
HTML
|
|
||
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>Load and Run (LODRUN)</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="LODRUN.Top_Of_Page"></a>
|
||
|
<h2>Load and Run (LODRUN)</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="#LODRUN.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#LODRUN.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#LODRUN.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="LODRUN"></a>
|
||
|
<p>The Load and Run Media Program (LODRUN) command restores a user-written program object from tape, diskette, or optical device into the library QTEMP. The system passes the device name to the restored program and transfers control to the restored program.
|
||
|
</p>
|
||
|
<p>When the LODRUN command is run:
|
||
|
</p>
|
||
|
<ol>
|
||
|
<li>The media is searched for the user-written program, which must be named QINSTAPP and saved from library QTEMP.
|
||
|
<p>
|
||
|
<b>Note: </b>The program QINSTAPP must be owned by a user profile that resides on the target system. If QINSTAPP is restored to a system that does not have the owning user profile, control is not transferred and the program is not run.
|
||
|
</p>
|
||
|
</li>
|
||
|
<li>If a QINSTAPP program already exists in the QTEMP library on the user's system, it is deleted.
|
||
|
</li>
|
||
|
<li>The QINSTAPP program is restored to the QTEMP library using the RSTOBJ command. The following values are specified on the RSTOBJ command:
|
||
|
<ul>
|
||
|
<li>OBJ(QINSTAPP)
|
||
|
</li>
|
||
|
<li>OBJTYPE(*PGM)
|
||
|
</li>
|
||
|
<li>SAVLIB(QTEMP)
|
||
|
</li>
|
||
|
<li>ENDOPT(*LEAVE)
|
||
|
</li>
|
||
|
<li>MBROPT(*ALL)
|
||
|
</li>
|
||
|
<li>ALWOBJDIF(*NONE)
|
||
|
</li>
|
||
|
<li>RSTLIB(QTEMP)
|
||
|
</li>
|
||
|
<li>VOL(*MOUNTED)
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>If the device is an optical device, the ENDOPT and the VOL parameters are not specified.
|
||
|
</p>
|
||
|
<p>If the device is optical, then the value specified for the DIR for this command is used for the OPTFILE parameter for the Restore Object (RSTOBJ) command.
|
||
|
</p>
|
||
|
<p>The SEQNBR parameter is specified according to the SEQNBR parameter on the LODRUN command.
|
||
|
</p>
|
||
|
<p>The device used for the restore operation is determined by the LODRUN command. If *TAP, *DKT, or *OPT are specified on the DEV parameter, the LODRUN command examines the QDEVNAMING system value to determine if the system uses iSeries or System/36 naming conventions for devices:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>If QDEVNAMING is *NORMAL (iSeries convention)
|
||
|
<ul>
|
||
|
<li>The device TAP01 is used for DEV(*TAP).
|
||
|
</li>
|
||
|
<li>The device DKT01 is used for DEV(*DKT).
|
||
|
</li>
|
||
|
<li>The device OPT01 is used for DEV(*OPT).
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>If QDEVNAMING is *S36 (System/36 convention)
|
||
|
<ul>
|
||
|
<li>The device TC is used for DEV(*TAP) if a tape cartridge is found. Otherwise, device T1 is used.
|
||
|
</li>
|
||
|
<li>The device I1 is used for DEV(*DKT).
|
||
|
</li>
|
||
|
<li>The device OPT01 is used for DEV(*OPT). System/36 naming conventions do not apply to optical devices.
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>Any other value specified on the DEV parameter is used as is.
|
||
|
</p>
|
||
|
</li>
|
||
|
<li>Control of the system is passed to the QINSTAPP program. The QINSTAPP program can be used, for example, to restore other applications to the user's system and run those applications.
|
||
|
</li>
|
||
|
<li>When the user signs off, the QINSTAPP program is removed from the system.
|
||
|
</li>
|
||
|
<li>The settings of three system values work together to determine if the QINSTAPP program is allowed to be restored or if it is converted during the restore. The three system values are:
|
||
|
<ul>
|
||
|
<li>QVFYOBJRST Verify object restore
|
||
|
</li>
|
||
|
<li>QFRCCVNRST Force conversion on restore
|
||
|
</li>
|
||
|
<li>QALWOBJRST Allow object restore option
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>The LODRUN command does not transfer control to the QINSTAPP program if these values do not allow the restore and conversion of the QINSTAPP program.
|
||
|
</p>
|
||
|
</li>
|
||
|
</ol>
|
||
|
<p>The user supplying the QINSTAPP program is responsible for writing and supporting it. The QINSTAPP program is not supplied by IBM. The program can be designed to accomplish many different tasks. For example, the program could:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>Restore and run other programs or applications
|
||
|
</li>
|
||
|
<li>Restore a library
|
||
|
</li>
|
||
|
<li>Delete another program or application
|
||
|
</li>
|
||
|
<li>Create specific environments
|
||
|
</li>
|
||
|
<li>Apply fixes to existing applications
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>The QINSTAPP program is run only once each time the LODRUN command is entered. The LODRUN command passes only one parameter (DEV), which specifies the device from which the QINSTAPP program is restored. The QINSTAPP program should not attempt to use the LODRUN command again. This will have unpredictable results.
|
||
|
</p>
|
||
|
<p>In addition to writing the QINSTAPP program, the user suppling the program is responsible for providing the user with the media containing the program. To distribute the program on a tape, diskette, or optical device, do the following:
|
||
|
</p>
|
||
|
<ol>
|
||
|
<li>Prepare the tape or diskette. For tape, use the Initialize Tape (INZTAP) command. For diskette, use the Initialize Diskette (INZDKT) command with FMT(*SAVRST) specified.
|
||
|
</li>
|
||
|
<li>Use the Create Duplicate Object (CRTDUPOBJ) command to create the QINSTAPP program into the QTEMP library.
|
||
|
</li>
|
||
|
<li>Use the Save Object (SAVOBJ) command to save the QINSTAPP program from QTEMP to the desired tape device or diskette unit. The program must be the only object in the media file that contains it. Specify the following:
|
||
|
<ul>
|
||
|
<li>LIB(QTEMP)
|
||
|
</li>
|
||
|
<li>LABEL(*LIB)
|
||
|
</li>
|
||
|
<li>CLEAR(*ALL)
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>Specifying LABEL(*LIB) ensures that the label will be QTEMP. If the QINSTAPP program is being saved to a tape device, and if additional applications, programs, or libraries will be saved to tape, ENDOPT(*LEAVE) also must be specified. The correct value for the TGTRLS parameter must also be entered if the target release is not the default, *CURRENT.
|
||
|
</p>
|
||
|
</li>
|
||
|
<li>Use the Save Object (SAVOBJ), Save Library (SAVLIB), or Save License Program (SAVLICPGM) command to save any other necessary applications, programs, or libraries to the tape or diskette. This step is optional and is used to save applications that the QINSTAPP program restores to the user's system when the LODRUN command is run.
|
||
|
<p>If the QINSTAPP program is saved to tape, the tape is not rewound after the QINSTAPP program is restored; the application or series of applications that the QINSTAPP program restores to the user's system should be next on the tape.
|
||
|
</p>
|
||
|
</li>
|
||
|
</ol>
|
||
|
<p><b>Restriction:</b> The QINSTAPP program that is loaded from the media and called may require specific authority in order to run correctly. The user supplying the QINSTAPP program should inform you if any specific authorities are required.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="LODRUN.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="#LODRUN.DEV"><b>DEV</b></a></td>
|
||
|
<td valign="top">Device</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*TAP</u></b>, *DKT, *OPT</td>
|
||
|
<td valign="top">Optional, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#LODRUN.SEQNBR"><b>SEQNBR</b></a></td>
|
||
|
<td valign="top">Sequence number</td>
|
||
|
<td valign="top"><i>Decimal number</i>, <b><u>*FIRST</u></b>, *SEARCH</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#LODRUN.VOL"><b>VOL</b></a></td>
|
||
|
<td valign="top">Volume identifier</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*MOUNTED</u></b>, *SAVVOL</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#LODRUN.DIR"><b>DIR</b></a></td>
|
||
|
<td valign="top">Directory</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>'/'</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="LODRUN.DEV"></a>
|
||
|
<h3>Device (DEV)</h3>
|
||
|
<p>Specifies the I/O device from which the program is loaded.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*TAP</u></b></dt>
|
||
|
<dd>The program is loaded from the default tape device connected to the system.
|
||
|
</dd>
|
||
|
<dt><b>*DKT</b></dt>
|
||
|
<dd>The program is loaded from the default diskette device connected to the system.
|
||
|
</dd>
|
||
|
<dt><b>*OPT</b></dt>
|
||
|
<dd>The program is loaded from the default optical device connected to the system.
|
||
|
</dd>
|
||
|
<dt><b><i>tape-device</i></b></dt>
|
||
|
<dd>Specify the name of the tape device from which the program is loaded onto the system.
|
||
|
</dd>
|
||
|
<dt><b><i>diskette-device</i></b></dt>
|
||
|
<dd>Specify the name of the diskette device from which the program is loaded onto the system.
|
||
|
</dd>
|
||
|
<dt><b><i>Optical-device</i></b></dt>
|
||
|
<dd>Specify the name of the optical device from which the program is loaded onto the system.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="LODRUN.SEQNBR"></a>
|
||
|
<h3>Sequence number (SEQNBR)</h3>
|
||
|
<p>Specifies, only when tape is used, the sequence number used for the restore operation.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FIRST</u></b></dt>
|
||
|
<dd>The volume on a tape device is searched starting from the first data file for a data file with an identifier that is a match for the QTEMP label. When the first match is found, the object is restored.
|
||
|
</dd>
|
||
|
<dt><b>*SEARCH</b></dt>
|
||
|
<dd>The volume on a tape device is searched starting from the first data file beyond the current tape position for a data file with an identifier that is a match for the QTEMP label. When a match is found, the object is restored.
|
||
|
</dd>
|
||
|
<dt><b><i>sequence-number</i></b></dt>
|
||
|
<dd>Specify the sequence number of the file. Valid values range from 1 through 16777215.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="LODRUN.VOL"></a>
|
||
|
<h3>Volume identifier (VOL)</h3>
|
||
|
<p>Specifies, only when tape is used, the volume identifier for the tape devices.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*MOUNTED</u></b></dt>
|
||
|
<dd>The volume currently mounted on the tape device is used.
|
||
|
</dd>
|
||
|
<dt><b><i>volume-identifier</i></b></dt>
|
||
|
<dd>Specify the volume identifier mounted on the tape device.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="LODRUN.DIR"></a>
|
||
|
<h3>Directory (DIR)</h3>
|
||
|
<p>Specifies, only when an optical device is used, the directory used for the restore operation. If the file named QTEMP.;1 is found in the specified directory, the object is restored.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>'/'</u></b></dt>
|
||
|
<dd>The root directory (/) is used.
|
||
|
</dd>
|
||
|
<dt><b><i>directory-name</i></b></dt>
|
||
|
<dd>Specify the directory to search for a file named QTEMP.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="LODRUN.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p><b>Example 1: Restoring a Program from Tape</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
LODRUN DEV(TAP01)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command restores the program object from the tape on device TAP01 to the library QTEMP. Control is then transferred to the restored program.
|
||
|
</p>
|
||
|
<p><b>Example 2: Restoring the Program QINSTAPP from Tape</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
LODRUN DEV(TAP01) SEQNBR(5)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command restores the program object QINSTAPP from the tape at sequence number 5 on device TAP01 to the library QTEMP. Control is then transferred to the restored program. If the sequence number is not found, an escape message is sent. If the file label at that sequence number is not QTEMP, an escape message is sent.
|
||
|
</p>
|
||
|
<p><b>Example 3: Restoring the Program QINSTAPP from CD-ROM</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
LODRUN DEV(*OPT) DIR('/APP1/INST')
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command restores the program object QINSTAPP from the CD-ROM on device OPT01 to the library QTEMP. The filename for the QTEMP library on the CD-ROM is /APP1/INST/QTEMP. Control is then transferred to the restored program. If the file is not found, an escape message is sent.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="LODRUN.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p>None
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#LODRUN.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|