The IBM-supplied job descriptions QCTL, QINTER, and QPGMR all have a log level of LOG(4 0 *NOLIST); therefore all messages help text are written to the job log. However, the job logs are not printed if the job ends normally unless you specify *LIST on the SIGNOFF command.
If a display station user uses and IBM-supplied menu or the command entry display, all error messages are displayed. If the display station user uses a user-written initial program, any unmonitored message causes the initial program to end and a job log to be produced. However, if the initial program monitors for messages, it receives control when a message is received. In this case, it is important to ensure that the job log is produced so that you can determine the specific error that occurred.
PGM DCLF MENU DCL &SIGNOFFDPT TYPE(*CHAR) LEN(7) VALUE(*NOLIST) . . . MONMSG MSG(CPF0000) EXEC(GOTO ERROR) PROMPT: SNDRCVF RCDFMT(PROMPT) CHGVAR &IN41 '0' . . . IF (&OPTION *EQ '90') SIGNOFF LOG(&SIGNOFFOPT); . . . GOTO PROMPT ERROR: CHGVAR&SIGNOFFOPT '*LIST' CHGVAR &IN41 '1' GOTO PROMPT ENDPGM
If an exception occurs, the CHGVAR command changes the option on the SIGNOFF command to *LIST and sets on an indicator. This indicator can be used to condition a constant that displays a message explaining that an unexpected error occurred and telling the display station user what to do.