My apologies - I guess I did not finish sending that info - so here goes.
The knowledge base article is at http://www-912.ibm.com/s_dir/slkbase.nsf/1ac66549a21402188625680b0002037e/87d6dce3b5ab62c486256c8b005acd11
Title is "Receiving Messages from the Joblog after the Program Is off the Callstack". I modified it to just remove messages that I received during a process.
There are 2 examples in CL, one using RCVMSG, the other the QMHRCVPM API. There's also an example in C. I made mine in ILE RPG.
Basic idea is to send messages around your process, and have those messages give you their message keys.
1. Send a program message with a blank in the message text, and have it return its message key as the starting message key.
2. Run the process whose messages you might want to remove
3. Send another blank-text program message, returning its message as the ending message key.
Now you want to get all the messages that occurred during your process.
1. Receive the messages by key, starting with the starting message key.
2. Check each to see if you want to remove it.
3. Increment the message key and receive the next message, until you get to the ending message key.
Hope it helps - it saved my life recently. Basically I created a procedure to get the low key, another to get the high key, and finally a third to clear messages.
You do have to remove the messages you sent out - I think the article says that - and you won't get messages for all keys - some are already removed by the system.
-------------- Original message --------------
From: beppecosta <beppecosta@xxxxxxxxxxx>
I haven't seen the post. Where can I find it ? Or, can you send me a piece of
code I can try ?
Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives