×
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.
On 8/19/2011 1:27 AM, Vern Hamberg wrote:
Otherwise, there's a method of getting all messages by key between the
start of a process and the end - IBM put out KB on it, maybe look for
how to find all messages from a job log. That might catch these messages
that aren't available through standard typical ways.
The method is easy enough. You send a place holder message at the
beginning of your process and save the message key. You send another
message at the end and save that key. Then do a RCVMSG for every
message key in that range.
sndpgmmsg 'start save' topgmq(*same) keyvar(&key_start)
rmvmsg msgkey(&key_start)
/* do a big pile of stuff */
/* big pile finished... did any errors occur? */
sndpgmmsg 'stop save' topgmq(*same) keyvar(&key_stop)
rmvmsg msgkey(&key_stop)
/* calculate the first possible diagnostic message */
chgvar %bin(&msgkey 1 4) (%bin(&key_start 1 4) + 1)
get_msg:
/* get the diagnostic message */
RCVMSG PGMQ(*SAME (*)) +
MSGTYPE(*DIAG) RMV(*no) MSGDTA(&MSGDTA) +
MSGID(&MSGID) msgkey(&msgkey)
monmsg cpf2410 exec(do) /* msg not found */
rcvmsg msgtype(*excp) rmv(*yes) /* delete unwanted msg */
goto next_msg
enddo
/* if empty, all done */
if (&msgid *eq ' ') goto exitpgm
/* process the message */
next_msg:
/* increment the message key */
chgvar %bin(&msgkey 1 4) (%bin(&msgkey 1 4) + 1)
if (&msgkey *lt &key_stop) goto get_msg
exitpgm:
As an Amazon Associate we earn from qualifying purchases.