If you would like to access your completed job messages without having to look for them with a DSPMSG command, and you do not want the annoyance of break messages interrupting your current work, try this message handling program (MONMSG). (See 1.)
If you would like to access your completed job messages without having to look for them with a DSPMSG command, and you do not want the annoyance of break messages interrupting your current work, try this message handling program (MONMSG). (See Figure 1.)
After compiling program MONMSG, execute the following command to cause your completion messages to appear unobtrusively as status messages at the bottom of your screen. You might add this command to your initial program or setup routine.
CHGMSGQ MSGQ (current completion message queue) + DLVRY(*BREAK) PGM(MONMSG)
It works by changing a message queue to *BREAK delivery mode and specifying a message handling program. This will cause OS/400 to call the specified program each time a message arrives at the message queue.
Bill O'Toole San Diego, California
TechTalk: Monitoring Job Completion Messages
Figure 1 CL program MONMSG
MONMSG: + PGM PARM(&MSGQ &MSGQLIB &MSGK) DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10) DCL VAR(&MSGQLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGK) TYPE(*CHAR) LEN(4) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(132) RCVMSG MSGQ(&MSGQLIB/&MSGQ) MSGKEY(&MSGK) RMV(*NO) MSG(&MSGDTA) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGDTA) + TOPGMQ(*EXT) MSGTYPE(*STATUS) ENDPGM
LATEST COMMENTS
MC Press Online