Aborting Sequence if job finshed with warnings

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
suman27
Participant
Posts: 33
Joined: Wed Jul 15, 2009 6:52 am
Location: London

Aborting Sequence if job finshed with warnings

Post by suman27 »

Hi,

We are using an ' exception handler' stage in the sequencer to capture the job status. We want to abort the sequence if job finished with warnings or job is aborted.
Exception handler is working if job is aborted but not working if job is finished with warnings,

All job triggers in the sequence are 'OK-Conditional'.
checked the fallowing options
automatically handles the activities that fail.
log warnings after activities that finish with status other then ok.

We tried running the sequence by selecting limits/abort job after/ as 1, but no use

Regards,
Suman.
ajay.vaidyanathan
Participant
Posts: 53
Joined: Fri Apr 18, 2008 8:13 am
Location: United States

Aborting Sequence if job finshed with warnings

Post by ajay.vaidyanathan »

Hi,
There are already few posts on the same context. Please search it in the forum.

Try Having "Custom Conditional" Trigger and check the JobStatus = 'Finished Ok' for SUCCESS Else GoTo Failure Link
Regards
Ajay
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Exception Handler is only triggered by a failure, not by a warning.

If you want to manage warnings, you need explicit triggers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suman27
Participant
Posts: 33
Joined: Wed Jul 15, 2009 6:52 am
Location: London

Post by suman27 »

ray.wurlod wrote:Exception Handler is only triggered by a failure, not by a warning.

If you want to manage warnings, you need explicit triggers. ...
Thanks ray,
Could you suggest any alternatives for this situation.
How to abort job if there are any warnings.
We have to use exception handler as there are many jobs(30) in one sequence. and we have many such sequences in project.
Dragging a failure trigger(link) from each job(job activity) is going to be a mess.

Regards,
Suman.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

then there is not many options left for you.

either abort the sequence on 1 warning by setting the warning limit or insert a after job subroutine in each job to raise exception if the INTRIM JOB STATUS is not equal to 1.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Another option would be to build a custom routine that scans the current job log for warnings and aborts the Sequence if it finds any.
-craig

"You can never have too many knives" -- Logan Nine Fingers
suman27
Participant
Posts: 33
Joined: Wed Jul 15, 2009 6:52 am
Location: London

Post by suman27 »

priyadarshikunal wrote:then there is not many options left for you.

either abort the sequence on 1 warning by setting the warning limit or insert a after job subroutine in each job to raise exception if the INTRIM JOB STATUS is not equal to 1.

Hi Priyadarshikunal,
I tried setting that limit to 1, but still job is not getting aborted. It will still finish with warning but in the log there will be a fetal error 'Issuing abort after 1st warnings logged'

Regards,
Suman.
suman27
Participant
Posts: 33
Joined: Wed Jul 15, 2009 6:52 am
Location: London

Post by suman27 »

chulett wrote:Another option would be to build a custom routine that scans the current job log for warnings and aborts the Sequence if it finds any. ...
Hi chulett,
Thanks for your suggestion.
This option will not work for me,because before the routine finds warnings in job and trigger abort for the sequence , there is a chance that next job will start running.
my requirement is restricting all other jobs as soon as any job got warnings,

any other advices are welcome.

Regards,
Suman.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That wasn't clear from anything you've posted so far. Then, as noted, mess or not you'll need explicit triggers.
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Have you tried anything posted so far?

1. You need to check "Log warning in case any activity finishes other that ok" (or something like that) in sequence properties so that the sequence gets aborted too.

2. Custom routine called as after job subroutine of each job will raise an exception and exception handler should catch that and then you can abort the sequence using terminator. You need OK triggers so that i doesn't start the next job or looses the check point.

3. Or scan through the job logs to find the warning before you raise an exception.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply