× 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 Sun, Oct 5, 2014 at 4:00 PM, Carel Teijgeler <coteijgeler@xxxxxxxxx> wrote:
Is it not simpler to SBMJOB the progamme in STATUS(*HOLD).
If there are no conditions to ENDJOB, you can RLSJOB. If the ENFJOB is done
while the job is active you may have to reverse all transactions already
made (Commitment control).

I appreciate the thoughts, but it would not be simpler to RLSJOB
because then I would have to have some method of scheduling the RLSJOB
to execute at a specified future date. Under normal conditions, the
RLSJOB would need to execute on that date, but under the cancel
conditions, I'd have to have a way to cancel the RLSJOB. So I would
be right back where I started, just with one extra layer.

As for not ending a job while it's running, I have a few options
available to me. The simplest would be to execute ENDJOB with a very
high controlled delay (like, say, an hour). It's not fool-proof, but
if the job is running for more than 20 or 30 minutes, something is
already wrong. And under normal circumstances, the job will not have
started yet, so it will end immediately with no ill consequences.

More robust would be to include logic in the "job canceler" program
that does some checks before executing the ENDJOB. The most reliable
way to check would be to use APIs to get the status of the job in
question to see if it's actually running. (Or at least I haven't
heard of a way to get the job status other than through APIs, or
kludgy DSPJOB spool-parsing, for those allergic to system APIs.) In
practice, for my situation, it should be reliable enough simply to
check whether we've reached the originally scheduled run time for the
submitted job. (The only way this would be wrong is if someone else
or some other process changed the scheduled run time so that it's
running earlier than expected.) A combination of checking the current
datetime against the scheduled datetime and a long controlled delay
should be more than robust enough for my purposes.

(I am not allergic to APIs, but I can't say I look forward to using
them either, and I don't yet have convenient wrappers for what I would
need.)

John Y.

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.