Joe,
To me this sounds like the 'best' solution, but might require a little more
time than I want to invest. I might give Mihai's idea a spin seeing as
well have TAATools installed.
Thanks for the quick responses everyone!
Jim McLean
"Joe Pluta"
<joepluta@plutabr
others.com> To
Sent by: "'Midrange Systems Technical
midrange-l-bounce Discussion'"
s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx>
cc
11/12/2007 12:04 Subject
PM RE: Automatically killing long
running jobs
Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>
From: Jim.McLean@xxxxxxxxxx
Any ideas on how best to accomplish this? Or am I off the mark in trying
this?
Jim, just talking off the top of my head here, but maybe you could use a
routing entry. You could conceivably add a routing entry that performs
three steps for every job that is submitted to the subsystem.
The first step would submit a "kill" job to another queue and that job
would
basically do a delay for X seconds and then cancel the job that submitted
it. The next step would execute the actual report (I think you can just
call QCMDEXC with the request data for the job). The last step would
cancel
the kill job. I haven't played with routing entries for a long time, but I
think this will work.
The actual mechanics would be relatively simple. Create a keyed data queue
in a utility library with a 6-character key. That would be the job number
that is running the report.
The before routing step submits the kill job, passing it the job
information
of the report job. The kill job simply waits on the data queue using the
job number of the report job for X seconds. If it gets a timeout, it kills
the report job. If it gets a message (essentially a cancel message), it
just ends without doing anything.
The after routing step would just send a message to that queue with the
appropriate key, thus canceling the kill job.
Joe
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.