× 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.



Buck -

I tried this technique in my program [ with the only change being to receive
MSGTYPE(*ANY) ], but it doesn't receive any of the messages which get
generated from the time that the FTP command until it ends...

- sjl


Buck wrote:
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.

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.