On 01-Aug-2016 12:03 -0500, dlclark wrote:
On 01-Aug-2016 11:06 -0500, Tim Bronski wrote:
Thanks, I implemented a QMHRCVM loop on QSYSOPR.

Is that more efficient that using a message queue list? I'm currently
using the message queue list API's for those two messages so I was
curious which method is more efficient?

In the scenario of the OP, the logged non-program\message-queue message CPF0995 will be known to have been issued quite literally just a moment prior, thus the message will be found near the /end/ of the queue [if not already deleted]. Thus the retrieval starting with MSGTYPE(*LAST) and reviewing each MSGTYPE(*PRV) relative to the most recent Message Key (MSGKEY) value that was received using the Receive Nonprogram Message (QMHRCVM) API, generally would be much more efficient than either of the List Nonprogram Messages (QMHLSTM) API or the Open List of Messages (QGYOLMSG) API which require management of storage\structures way beyond what is required with the effective Receive Message (RCVMSG) utilizing only Program Automatic Storage (PASA). However the use of the /List direction/ and other /selection criteria/ and\or limiting of output can ameliorate the overhead of the listing APIs; limiting output could however, require multiple invocations.

Note: The listing API(s) might also have a negative impact on the ability of the system to send messages to the queue for which messages are being listed; the same should not be true of the Receive Message interface.

Irrespective of which API\method, if the message has been deleted before the processing of the messages begins, the amount of messages processed could be excessive if no logic is included to avoid looking to exhaustively or finding a /stale/ version of that which is being searched; i.e. sanity-checking the retrieved results, perhaps based on a relative date\time, might have some value.

Note: I do not recall the impact on each of the APIs, for when the message queue being processed, is set in break-mode [DLVRY(*BREAK)] by another job.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].