Abort a Job Manually

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

Post Reply
kishleo
Participant
Posts: 1
Joined: Tue Jan 13, 2004 3:03 am

Abort a Job Manually

Post by kishleo »

Hi Guys,
i want to fail my job based on my condition, may i know how to force a job to fail. i need to force it to fail because my job sequence depending on this job. so i should return something from this job back to my sequence so that i can have 2 pipelines.
hope you got my question.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

If you are writing your own code, involve the DSLogFatal() function. From a Job Sequence use a Routine activity that calls UtilityAbortToLog().

Each of these has a side effect of aborting the job.

I disagree completely with the practice of aborting jobs, but the information above is how to achieve it.

I believe that the master job control should retain complete control, under all circumstances.
Last edited by ray.wurlod on Thu Jun 29, 2006 6:53 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

You can also use terminator activity or exception handler...

Thanks,
Anupam
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

An Exception Handler does not cause an abort.

A Terminator activity sends a stop request to all running job, so that their status will end up being "Stopped" rather than "Aborted".

Thus neither suggestion is correct. Neither approach will abort a job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Post by sb_akarmarkar »

ray.wurlod wrote:An Exception Handler does not cause an abort.

A Terminator activity sends a stop request to all running job, so that their status will end up being "Stopped" rather than "Aborted".

Thus neither ...
Exception Handler + UtilityAbortToLog() routine


Thanks,
Anupam
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Exception handler will get the control only when the job gets aborted. There wont be any use of UtilityAbortToLog () then.
If you need to abort within in the same job, you have another ugly approach to marking 'bortAfter n rows' in transformer.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply