|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Should I dump this approach and try List Job Log Messages (QMHLJOBL) API instead? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin rob@dekko.com Sent by: midrange-l-admin@midrange.com 05/03/2002 11:30 AM Please respond to midrange-l To: midrange-l@midrange.com cc: Fax to: Subject: Retrieving messages from the job message queue. This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] I want to count how many times that a message appears in a job log of a currently running job. I am trying the following program with no luck. If I use *PRV it finds no messages. If I use *EXT instead of *PRV it finds some of the messages. But not the ones that I am looking for. PGM ( + &SEARCHMSG /* Message to count */ + &MSGCOUNT /* Count of messages which appeared */ + ) DCL &APOS *CHAR 1 /* Apostrophe */ DCL &MSGCOUNT *DEC 3 /* Count of message occurance */ DCL &MSGID *CHAR 7 /* Message id from stack */ DCL &MSGKEY *CHAR 4 /* Key of message from stack */ DCL &SEARCHMSG *CHAR 7 /* Message to count */ CHGVAR VAR(&APOS) VALUE(X'7D') CHGVAR VAR(&MSGCOUNT) VALUE(0) /* + | Position to top of job message queue + */ RCVMSG PGMQ(*PRV) MSGQ(*PGMQ) MSGTYPE(*NEXT) MSGKEY(*TOP) + RMV(*NO) KEYVAR(&MSGKEY) MSGID(&MSGID) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(END)) NEXT: IF (&MSGID=&SEARCHMSG) DO CHGVAR &MSGCOUNT VALUE(&MSGCOUNT + 1) ENDDO /* + | Get next message + */ RCVMSG PGMQ(*PRV) MSGQ(*PGMQ) MSGTYPE(*NEXT) MSGKEY(&MSGKEY) + RMV(*NO) KEYVAR(&MSGKEY) MSGID(&MSGID) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(END)) GOTO NEXT END: ENDPGM Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.