Source: geocities.com/siliconvalley/pines/9037

               ( geocities.com/siliconvalley/pines)                   ( geocities.com/siliconvalley)    
 /* ================================================================ */
 /*                                                                  */
 /* Program    : ZBRKMSGPGM                                          */
 /*                                                                  */
 /* Description: Intercepts break messages and displays them as      */
 /*              *STATUS messages on the bottom line of the display. */
 /*                                                                  */
 /* Notes      : The best (?) way to activate this program is to add */
 /*              the following lines to the users initial program.   */
 /*                                                                  */
 /*          CHGMSGQ    MSGQ(*USRPRF) DLVRY(*BREAK) PGM(ZBRKMSGPGM)  */
 /*          CHGMSGQ    MSGQ(*WRKSTN) DLVRY(*BREAK) PGM(ZBRKMSGPGM)  */
 /*                                                                  */
 /*                                                                  */
 /* ================================================================ */

 ZBRKMSGPGM: PGM        PARM(&MSGQ &LIB &MSGKEY)

             DCL        VAR(&USER) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSG) TYPE(*CHAR) LEN(200)
             DCL        VAR(&RTNTYPE) TYPE(*CHAR) LEN(2)
             DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)
             DCL        VAR(&LIB) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGKEY) TYPE(*CHAR) LEN(4)
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7)
             DCL        VAR(&MSGF) TYPE(*CHAR) LEN(10)
             DCL        VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)

             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR))

             RTVJOBA    USER(&USER)

             RCVMSG     MSGQ(&LIB/&MSGQ) MSGKEY(&MSGKEY) RMV(*NO) +
                          MSG(&MSG) MSGID(&MSGID) RTNTYPE(&RTNTYPE) +
                          MSGF(&MSGF) MSGFLIB(&MSGFLIB)

             IF         COND(&RTNTYPE *EQ '05') THEN(DSPMSG +
                          MSGQ(&LIB/&MSGQ))

             IF         COND(&RTNTYPE *NE '05') THEN(DO)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSG) +
                          TOPGMQ(*EXT) MSGTYPE(*STATUS)
             MONMSG     MSGID(CPF0000)
             ENDDO

             GOTO       CMDLBL(END)

 ERROR:      SNDMSG     MSG('ERROR: An error occured with program +
                          BRKMSGPGM, Check Joblog...') TOUSR(&USER)
             MONMSG     MSGID(CPF0000)
             DSPMSG
             MONMSG     MSGID(CPF0000)

 END:        ENDPGM