Time Limits on jobs

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Dont even think about killing the process using the dreaded 'kill' command. There can be open connections to a database, runaway processes that would leach over the resouces, not to mention, you getting a call from system admin.
Try my method, set the warning level to 1, and if your timer times out, just log a warning message, this will force the job to abort.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
NEO
Premium Member
Premium Member
Posts: 163
Joined: Mon Mar 22, 2004 5:49 pm

Post by NEO »

Coming to think of it, we use exceptional handlers connected to an abort stage to abort the master sequencers. So to abort jobs, using your dsjob -log -warn might actually invoke the exception handler and abort the job. I will have to try that.
NEO
Premium Member
Premium Member
Posts: 163
Joined: Mon Mar 22, 2004 5:49 pm

Post by NEO »

Nope. That doesnt work. The sequencer continues to run inspite of the exception handler. I think I will have to go with the zero warning approach
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Exception handler only fires if anything goes wrong in the sequence job and it is not handled. Thats when the Exception handler fires.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
NEO
Premium Member
Premium Member
Posts: 163
Joined: Mon Mar 22, 2004 5:49 pm

Post by NEO »

Even invoking the master sequence with dsjob warning limit of 1 and then logging a warning after timeout didnt work.

Code: Select all

$dshome/bin/dsjob -run -jobstatus -warn 1 $DSproject $DS_job_name
The master sequence job should abort but it didnt??!![/code]
NEO
Premium Member
Premium Member
Posts: 163
Joined: Mon Mar 22, 2004 5:49 pm

Post by NEO »

I am giving up hope. Doesnt seem like there is a clean and elegant way to abort a job from the comand line. I will have to go with my workaround plan of masking my master sequence in a job activity and use my wait for done file approach. That works, but I will have to create these timer super sequencers to run master sequencers. any other ideas??
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you can specify under exactly what conditions you want an abort to occur, then you could create another job (Job Control code) that polled for those conditions and issued appropriate DSStopJob() calls.

Have you investigated a Terminator activity in a job sequence? That does much the same thing, but has to be triggered.

You can force the Exeception Handler to trigger only by guaranteeing that the sub-jobs abort. But you could set up user variables or routines that detect the exit status of all sub-jobs and trigger a control stream that ends with a Terminator.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply