Peter,
You could use the QWCJBITP API to schedule a command to run inside another job ... but, I don't think that will help because, although you can remove the messages from the job log, as far as I am aware, they will still be in the program message queue.
Mark S. Waterbury
On Wednesday, September 2, 2020, 5:53:51 PM EDT, Peter Dow <petercdow@xxxxxxxxx> wrote:
Hi Rob,
This
STRWCH SSNID(*GEN)
WCHPGM(QGPL/MyPgm)
WCHMSG((CPI9200))
WCHMSGQ((*JOBLOG))
WCHJOB((*ALL/*ALL))
works great as far as having one place to monitor for those messages
being sent. It gives me the job name, user, and number, and the message
ID and even the message key, e.g..MsgId:CPI9200 Msgq:*JOBLOG
Job:225959/PDOW/PDOWS1 MsgKey:1077952576
However, it has a drawback: RMVMSG only works for the current job. Same
with the QMHRMVPM api. And the QMHRMVM is only for non-program message
queues.
I had some small hope the the MSGKEY parameter on the RMVMSG command was
a global key, but apparently not:
Message . . . . : CPF2410 received by procedure MYPGM. (C D I R)
Cause . . . . . : ILE Control language (CL) procedure MYPGM in module
MYPGM in program MYPGM in library QGPL detected an error at statement
number 0000005200. Message text for CPF2410 is: Message key not found in
message queue QJOBMSGQ. Use F10 (if available) or the Display Job Log
Do you know of a way to remove a message from another job's joblog?
Without having to modify any programs in the other job?
Peter Dow
On 9/2/2020 12:59 PM, Rob Berendt wrote:
I've never done something like this but does this have potential?
STRWCH SSNID(*GEN)
WCHPGM(MYPGM)
WCHMSG((CPI9160) (CPI9200)
WCHMSGQ((*JOBLOG))
WCHJOB((*ALL/*ALL))
And then have MYPGM remove the offending messages from the joblog?
You could probably roll this out by customizing the WCHJOB
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.