| 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 a tape device, optical device or a save file into the library QTEMP. The system then 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 *SAVF is specified on the DEV parameter, the save file specified for the Save file (SAVF) parameter will be used.
Any other value specified for 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 will pass parameter(s) to the QINSTAPP program.
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 supplying the program is responsible for providing the user with the media containing the program.
To distribute the program on a tape or optical device, do the following:
Use the Save Object (SAVOBJ) command to save the QINSTAPP program from QTEMP to the desired tape device. The program must be the only object in the media file that contains it. Specify the following:
Specifying LABEL(*LIB) ensures that the label will be QTEMP. If additional applications, programs, or libraries will be saved to the tape, ENDOPT(*LEAVE) also should also be specified.
Save the additional items required by QINSTAPP 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.
Use the Save Object (SAVOBJ) command to save the QINSTAPP program from QTEMP to the desired optical device. If you wish to save the QINSTAPP program into anything other than the root directory, you must specify the OPTFILE parameter as follows:
Save additional items required by QINSTAPP to the optical device.
Ensure all the needed objects are in the library you plan to save into the save file. Then use the SAVLIB or SAVOBJ command to save the library objects into your save file.
For all media types, the correct value for the TGTRLS parameter must also be entered if the target release is not the default, *CURRENT.
Additional items saved to media could be any libraries, library objects, IFS directories, etc. that the QINSTAPP program needs to restore as part of its installation process.
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 that are required.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| DEV | Device | Name, *TAP, *OPT, *SAVF | Optional, Positional 1 |
| SEQNBR | Sequence number | Decimal number, *FIRST, *SEARCH | Optional |
| VOL | Volume identifier | Character value, *MOUNTED | Optional |
| DIR | Directory | Character value, '/' | Optional |
| SAVF | Save file | Qualified object name | Optional |
| Qualifier 1: Save file | Name | ||
| Qualifier 2: Library | Name, *LIBL, *CURLIB |
| Top |
Specifies the I/O device from which the program is loaded.
This is a required parameter.
| Top |
Specifies, only when tape is used, the sequence number used for the restore operation.
| Top |
Specifies, only when tape is used, the volume identifier for the tape devices.
| Top |
Specifies, only when an optical device is used, the directory used for the restore operation. If the file named QTEMP is found in the specified directory, the object is restored.
| Top |
Specifies the save file containing the QINSTAPP program.
Note: A value must be specified for this parameter if *SAVF is specified for the Device (DEV) parameter.
Qualifier 1: Save file
Qualifier 2: Library
| Top |
Example 1: Restoring the Program QINSTAPP from Tape
LODRUN DEV(TAP01)
This command restores the program object QINSTAPP 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 Specifying a Sequence Number
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 Optical
LODRUN DEV(*OPT) DIR('/APP1/INST')
This command restores the program object QINSTAPP from the media in device OPT01 to the library QTEMP. The filename for the QTEMP library on the optical media is /APP1/INST/QTEMP. Control is then transferred to the restored program. If the file is not found, an escape message is sent.
Example 4: Restoring the Program QINSTAPP from a Virtual Optical Device
LODRUN DEV(OPTVRT01)
This command restores the program object QINSTAPP from the virtual optical device OPTVRT01 to the library QTEMP. The filename for the QTEMP library on the optical media is /QTEMP. Control is then transferred to the restored program. If the file is not found, an escape message is sent.
Example 5: Restoring the Program QINSTAPP from a Save File
LODRUN DEV(*SAVF) SAVF(MYAPPLIB/MYSAVF)
This command restores the program object QINSTAPP from the save file named MYSAVF in library MYAPPLIB to the library QTEMP. Control is then transferred to the restored program. If the QINSTAPP program is not found, an escape message is sent.
| Top |
None
| Top |