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



Vern Hamberg wrote:

I've found the technique of looping through message keys to be
very effective. This has long been recommended by IBM. I've used
it to bracket a process where messages can come from diverse
sources. Article is entitled "Receiving Messages from the Joblog
after the Program Is off the Callstack", number 28942837. Would
that be useful in this scenario?


While that algorithm is effective for receiving program messages from programs no longer on the stack, the QSYSOPR is a non-program message queue; i.e. there is little value in mimicking that algorithm explicitly, because no program message queues are involved. That algorithm is mimicked however, however just by using the command parameter special values; no different than for when all of the programs [program message queues] remain active on the stack.

The non-program message queue can be searched simply by requesting the RCVMSG using MSGTYPE(*LAST|*FIRST) MSGKEY(&FrstRcvd), followed by a loop using the MSGTYPE(*PRV|*NEXT) MSGKEY(&PrevRcvd). The value in reference to the noted KB article is the concept of obtaining an original message key variable in order to know when to exit from the loop when reading backward, or where to start other than *FIRST when reading forward. However the /sender/ information can provide a date\time value against which compare could be used instead, to decide when to exit the loop. Or even all messages on the queue could be received every time, where the exit is only by compare to the expected MSGID value; of course that is a bad idea if the system might have gone into restricted state prior to this request before either an implicit CLRMSGQ *SYSOPR by the OS for IPL or an explicit request since the last ENDSYS.

Regards, Chuck

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.