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



Tom wrote:

> The break handler would also be invoked by a batch NEP; I usually use an
> auto-start job to do this. Once CHGMSGQ sets the break handler, the NEP
> can then go into a wait on a data queue or whatever to decide what to do
> next.

So the batch job's main function is to hold locks on the message queue or
queues? One advantage I can see to this is that a single job can monitor
multiple queues by running multiple CHGMSGQ commands whereas the RCVMSG
loop requires a program for each queue. What would the data queue wait be
for and what would the program do after serving the data queue entry? Would
the data queue be part of some control system that tells the program to
alter its monitoring in some way? I can see now how you might front-end
this with something quite sophisticated.

OTOH with a separate NEP for each queue it's very easy to do a WRKSBSJOB
and see immediately which queues are being monitored.

> One advantage of break handlers is in how the CHGMSGQ RESET() parameter
> affects execution. This provides a way to 'start where you left off',
> while RCVMSG often requires an external data area or some other means of
> tracking which messages have already been handled.

I'm having a little trouble getting my poor head round this one. A receive
message loop will normally receive each message once, as once received they
become old. If the process is restarted the program will only receive the
messages it has not already processed. However, it is also possible to
specify the RESET parameter in a receive loop NEP, putting the queue into
hold mode. This will allow the receive loop either to resume where it left
off or to reprocess all messages.

With a break handler OTOH messages are received by message key, so how does
resetting old messages to new affect which are handled? If a queue already
containing messages is put into break mode with a handling program, it
appears that only the first existing message in the queue invokes the
handler. RESET(*YES) and RESET(*NO) appear to have no effect on this
behaviour.

Still not convinced...

Dave...
===========================
The opinions expressed in this communication are my own and do not
necessarily reflect those of my employer.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.