× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have written something to do this.  You would have to modify the code to
send an E-mail and change which messages you want to monitor for.  Here's
the source if it will help.  You would make an initial submit job to the
program (mine's in qstrup) with the following parameter's
1. Message Queue
2. Check Cycle in Seconds
3. Blank Character - Not used
4. Type of messages to display ie: *inq
It resubmits itself at midnight so the joblog doesn't get to big.

             PGM        PARM(&MSGQ &CYCLE &HIT &TYPE)
             DCL        VAR(&MSG) TYPE(*CHAR) LEN(500) VALUE(' ')
             DCL        VAR(&MSGID) TYPE(*CHAR) LEN(7) VALUE(' ')
             DCL        VAR(&MSGKEY) TYPE(*CHAR) LEN(4) VALUE(' ')
             DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(500) VALUE(' ')
             DCL        VAR(&USER) TYPE(*CHAR) LEN(10) VALUE('ERICG')
             DCL        VAR(&MSGQ) TYPE(*CHAR) LEN(10)
             DCL        VAR(&CYCLE) TYPE(*CHAR) LEN(5)
             DCL        VAR(&TYPE) TYPE(*CHAR) LEN(5)
             DCL        VAR(&HIT) TYPE(*CHAR) LEN(1)
             DCL        VAR(&JOB) TYPE(*CHAR) LEN(10)

             DCL        VAR(&HOUR) TYPE(*CHAR) LEN(2)
             DCL        VAR(&MINCH) TYPE(*CHAR) LEN(2)
             DCL        VAR(&DELAY) TYPE(*DEC) LEN(5)
             DCL        VAR(&MINUTE) TYPE(*DEC) LEN(2)

 START:
             OVRPRTF    FILE(QPDSPMSG) HOLD(*YES)

             CHGMSGQ    MSGQ(&MSGQ) DLVRY(*BREAK)
             MONMSG     MSGID(CPF2451) EXEC(GOTO CMDLBL(END1))
             DLTSPLF    FILE(QPDSPMSG) SPLNBR(*LAST)
             MONMSG     MSGID(CPF3309)

             RCVMSG     MSGQ(&MSGQ) MSGTYPE(&TYPE) RMV(*NO) +
                          KEYVAR(&MSGKEY) MSG(&MSG) MSGDTA(&MSGDTA) +
                          MSGID(&MSGID)
             DLTSPLF    FILE(QPDSPMSG) SPLNBR(*LAST)
             MONMSG     MSGID(CPF3309)

             IF         COND(&MSGID = 'CPA4088') THEN(DO)
             SNDRPY     MSGKEY(&MSGKEY) MSGQ(&MSGQ) RPY(C)
             SNDMSG     MSG(&MSGDTA) TOUSR(&USER)
             CHGVAR     VAR(&MSGID) VALUE('       ')
             CHGVAR     VAR(&MSGKEY) VALUE('       ')
             ENDDO

             IF         COND(&MSGID = 'CPA2401') THEN(DO)
            SNDRPY     MSGKEY(&MSGKEY) MSGQ(&MSGQ) RPY(R)
            SNDMSG     MSG(&MSGDTA) TOUSR(&USER)
            CHGVAR     VAR(&MSGID) VALUE('       ')
            CHGVAR     VAR(&MSGKEY) VALUE('       ')
            ENDDO

            IF         COND(&MSGID = 'CPA57EF') THEN(DO)
            SNDRPY     MSGKEY(&MSGKEY) MSGQ(&MSGQ) RPY(C)
            CHGVAR     VAR(&MSGID) VALUE('       ')
            CHGVAR     VAR(&MSGKEY) VALUE('       ')
            ENDDO

            IF         COND(&MSGID = 'CPF4128') THEN(DO)
            CALL       PGM(KOGAPP/EGDIAL)
            ENDDO

            IF         COND(&MSGID = 'CPA5305') THEN(DO)
            CALL       PGM(KOGAPP/EGDIAL)
            ENDDO

            IF         COND(&MSGID = 'CPF0907') THEN(DO)
            CALL       PGM(KOGAPP/EGDIAL)
            ENDDO

            IF         COND(&MSGID = 'CPI099C') THEN(DO)
            CALL       PGM(KOGAPP/EGDIAL)
            ENDDO

            IF         COND(&MSGID = 'CPF6792') THEN(DO)
            SNDMSG     MSG(&MSGDTA) TOUSR(&USER)
            CHGVAR     VAR(&MSGID) VALUE('       ')
            CHGVAR     VAR(&MSGKEY) VALUE('       ')
            ENDDO

            IF         COND(&MSGID = 'RPG1021') THEN(DO)
            IF         COND(%SST(&MSG 1 20) = 'DSS537 5400 +
                         LABMSTL3') THEN(DO)
            SNDRPY     MSGKEY(&MSGKEY) MSGQ(&MSGQ) RPY(G)
            CHGVAR     VAR(&MSGID) VALUE('       ')
            CHGVAR     VAR(&MSGKEY) VALUE('       ')
            ENDDO
            ENDDO

            IF         COND(%SST(&MSG 1 35) = 'PROCESS SERIES +
                         BOUSE      COMPLETED') THEN(DO)
            RTVJOBA    JOB(&JOB)
            IF         COND(&JOB = 'POLL') THEN(CHGVAR VAR(&HIT) +
                         VALUE('Y'))
            GOTO       CMDLBL(END2)
            ENDDO

            CHGMSGQ    MSGQ(&MSGQ) DLVRY(*HOLD)

            DLYJOB     DLY(&CYCLE)

            RTVSYSVAL  SYSVAL(QHOUR) RTNVAR(&HOUR)
            IF         COND(&HOUR = '00') THEN(DO)
            RTVSYSVAL  SYSVAL(QMINUTE) RTNVAR(&MINCH)
            CHGVAR     VAR(&MINUTE) VALUE(&MINCH)
            CHGVAR     VAR(&DELAY) VALUE(&CYCLE)
            IF         COND(&MINUTE < &DELAY) THEN(DO)
            GOTO       CMDLBL(NEXT)
            ENDDO
            ENDDO

            GOTO       CMDLBL(START)

NEXT:
            SBMJOB     CMD(CALL PGM(KOGAPP/MONMSGCL) PARM(&MSGQ +
                         &CYCLE &HIT &TYPE)) JOBQ(*LIBL/QBATCH) +
                         USER(DB2CONN)
            MONMSG MSGID(CPF0000)
            GOTO       CMDLBL(END)


END1:       SNDPGMMSG  MSG('MONMSG Cannot allocate Message Queue' +
                         *BCAT &MSGQ *TCAT '.') TOMSGQ(*SYSOPR)
END2:       DLTOVR     FILE(*ALL)
            CHGMSGQ    MSGQ(&MSGQ) DLVRY(*HOLD)

 END:        RETURN
             ENDPGM

Eric Graeb
AS/400 Administrator
King Optical Group Inc.


> If you are "stuck" with having to do this yourself - good luck -
> but it could be done - though I would not suggest it.
>
> you would have to do a dspmsg of say the qsysopr message q to a print
file,
> and then read that into a program to see if there are any new messages,
> and then e-mail from there -
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.