× 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 Thu, 05 Jan 2012 09:47:13 -0800, CRPence <CRPbottle@xxxxxxxxx>
wrote:

Or a message queue. Both queue types support a WAIT timeout which in
some cases can almost directly replace a DLYJOB request, although with a
monitor for the timeout added; plus ensuring a destructive read [e.g.
RMV(*YES) on RCVMSG] which removes the "message" from whichever type of
queue [*DTAQ or *MSGQ] being used.

I like waiting on a data queue because WRKACTJOB shows the normal
function instead of the delay function that show with DLYJOB. And it
doesn't cause the feeling of panic of seeing MSGW! <G>

I have a standard for my never-ending jobs of creating a data queue in
QTEMP then waiting on it, 15 seconds at a time. After each wait ends,
the job checks for a controlled shutdown and ends if there is one.

If there is no controlled shutdown in progress, and if appropriate,
check a data area to see if the particular function has been requested
to run immediately. If so, reset the data area and run the function.

Otherwise check the time to see if the given function needs to be run.

For example, one job does its thing every ten minutes on the ten
minutes. So if the last digit of QMINUTE is zero, it executes the
function.

Then it does five 15-second waits on the data queue to make sure that
it doesn't execute the timed function twice in that minute (checking
after each wait for a controlled shutdown and checking the data area
to see if the function has been requested to run again immediately).

Then it does 15-second data queue waits until there is a controlled
shutdown or the last digit of QMINUTE is zero again or the data area
says to run the function immediately.

Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.

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.