Optional: Writing a user-defined installation program for the target systems
To write the user-defined installation program, complete these procedures.
The user-defined installation program performs tasks and sends the appropriate instructions to the operators at the target systems. It allows you to perform many installation tasks automatically and install customer-written applications at the target systems.
Example: User-defined installation program
The following control language (CL) program is an example of a user-defined installation program. It sends an instruction to the operator at the target system. It also restores a library that contains an application and copies the command to start the application in the QGPL library. The &DEVICE parameter in this example is the name of your media device. The &SUCCESS parameter is used as an indication of whether all licensed programs installed successfully.
PGM PARM(&DEVICE &SUCCESS)
DCL VAR(&DEVICE) TYPE(*CHAR) LEN(10)
DCL VAR(&SUCCESS) TYPE(*CHAR) LEN(1)
IF COND(&SUCCESS *EQ '1') THEN(DO)
SNDUSRMSG MSG('Load the tape in ' *CAT &DEVICE *CAT +
'and press the Enter key.')
RSTLIB SAVLIB(APP1) DEV(&DEVICE)
CRTDUPOBJ OBJ(STRAPP1) FROMLIB(APP1) +
OBJTYPE(*CMD) TOLIB(QGPL)
ENDDO
ELSE
SNDUSRMSG MSG('One or more licensed programs failed to +
install.')
ENDPGM
Next topic: Continue with the tasks in the checklist (step 6).