Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
When the LODRUN command is run:
Note: 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.
If the device is an optical device, the ENDOPT and the VOL parameters are not specified.
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.
The SEQNBR parameter is specified according to the SEQNBR parameter on the LODRUN command.
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:
Any other value specified on the DEV parameter is used as is.
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.
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:
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.
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:
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.
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.
Restriction: 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.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
DEV | Device | Name, *TAP, *DKT, *OPT | Optional, Positional 1 |
SEQNBR | Sequence number | Decimal number, *FIRST, *SEARCH | Optional |
VOL | Volume identifier | Character value, *MOUNTED, *SAVVOL | Optional |
DIR | Directory | Character value, '/' | Optional |
Top |
Specifies the I/O device from which the program is loaded.
This is a required parameter.
The possible values are:
Top |
Specifies, only when tape is used, the sequence number used for the restore operation.
The possible values are:
Top |
Specifies, only when tape is used, the volume identifier for the tape devices.
The possible values are:
Top |
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.
The possible values are:
Top |
Example 1: Restoring a Program from Tape
LODRUN DEV(TAP01)
This command restores the program object from the tape on device TAP01 to the library QTEMP. Control is then transferred to the restored program.
Example 2: Restoring the Program QINSTAPP from Tape
LODRUN DEV(TAP01) SEQNBR(5)
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.
Example 3: Restoring the Program QINSTAPP from CD-ROM
LODRUN DEV(*OPT) DIR('/APP1/INST')
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.
Top |
None
Top |