Q. I was very interested in Ernie Malaga's article, "Easy Software Distribution," which was printed in the February issue. When I tried to take advantage of the Load Run (LODRUN) command, however, I realized that I needed to let my QINST-
APP program know the name of the tape or diskette device specified in the LODRUN command. How is this done?
A. Your QINSTAPP program receives the device name in a 10-byte character parameter, which is the only parameter received by QINSTAPP. The program can then use this device name to perform restore operations from the tape or diskette supplied. For example, the QINSTAPP program listed in 7 restores a library called SOFTWARE.
A. Your QINSTAPP program receives the device name in a 10-byte character parameter, which is the only parameter received by QINSTAPP. The program can then use this device name to perform restore operations from the tape or diskette supplied. For example, the QINSTAPP program listed in Figure 7 restores a library called SOFTWARE.
When you mail a diskette with library SOFTWARE (and the QINST-APP program), the recipient runs the LODRUN command specifying the correct diskette device name for that system, and QINSTAPP will then be able to restore SOFTWARE.
TechTalk: The New LODRUN Command
Figure 7 Sample QINSTAPP program
Figure 7: Sample QINSTAPP Program QINSTAPP: PGM PARM(&DEV) DCL VAR(&DEV) TYPE(*CHAR) LEN(10) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(80) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) RSTLIB LIB(SOFTWARE) DEV(&DEV) VOL(*MOUNTED) + ENDOPT(*UNLOAD) SNDPGMMSG MSGF('Library SOFTWARE restored + successfully.') MSGTYPE(*COMP) RETURN ERROR: RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID) + MSGF(&MSGF) MSGFLIB(&MSGFLIB) SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE) ENDPGM
LATEST COMMENTS
MC Press Online