Parallel Job aborted Notification

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
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Parallel Job aborted Notification

Post by dsedi »

Hi All,

I have 70 parallel Jobs which is arranged under 5+ sequences( 3 levels of hierarchey)

and I scheduled all jobs once in an hour thru a Unix script scheduler

If suppose some of my job failed, The sequence which is having that particualr job aborted on the next time run(next hour),
and the Sequence on the next level failed on next run..etc..
i.e if any Job failed, the Unix scrpit notifying me (by some alerts) after 3 hrs...

any other better approch for this to get notified even if a single job failed in any of the sequence?

Please note most of Trigger condition in Job activity is Unconditional.

Thanks in advance.
Edi
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Re: Parallel Job aborted Notification

Post by kwwilliams »

Have you thought about using a nitification activity stage in your sequence. You can have a failure condition link from your job to your notification activity stage to email when the job fails. You could then put instructions in the email to let support know what to do, ignore rerun the sequence, whatever if they receive this email.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Basically you are not making use of the functionality that is provided. You can use a Routine activity to log a warning in the controlling job sequence; the Routine activity being triggered by detection of a failure (that is, a conditional trigger in the Job activity). You can also use the Exception Handler. Notification activity is used to send email.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Thanks Ray & William!

Sorry for the delayed acknowledgement!
________________________________

About using notification activity
------------------------------------
As you have mentioned, I was using the Exception Handler.
as we found in documents,It's just stoping the main sequence from running- if it found that any job is getting aborted in the sequence where the Exception Handler is present.

but it's not trigering the notification activity followed by the Exception Handler which will send me some emails about the Job failure.

Exception Handler is triggering the notification activity only if a job is already in aborted condition(in the previous run)

About using routine activity
--------------------------------
I was thinnking about how to use the routine activity to capture the failure of any jobs in the sequence( how to capture the logs of all the jobs in the sequence in routine activity)-
------------------------------------------------------------------------------------

I am sorry about this....

what i want to do is,

* I have a set of jobs arranged in a sequence.
* I want to stop the further execution immedately if any one of the
20 jobs in the sequence got Aborted
* I want to trigger some notification

Is it possibe by using Exception Handler?

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

Post by ray.wurlod »

Yes, basically.

Or you can explicitly code a Routine activity triggered from each Job activity (a Failure trigger) then direct all these via an "Any" Sequencer into a Terminator activity (7.5 and later only) to issue stop requests to all running child jobs.

The Terminator activity can, of course, also be invoked in the stream triggered by the Exception Handler.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Ray..Thanks again!

but the Exception handler is not aborting the Sequence ( it just stoping from running further)


I am using PX 7.0 ( NO Terminator activity :( )

My requirement is

Under sequence S1,i have

Jobactivity1-->if ok--->jobactivity2--->if ok---->job activity3 ...etc...

If any jobactivity failed,I need to abort the sequence.

even after having OK trigger condition between the jobactivities,it's just stopping the Sequence S1.

any help?

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

Post by ray.wurlod »

Routine activity invoking UtilityAbortToLog will abort the main sequence. But it will not send stop notifications to currently running jobs.

In 7.0 this is not quite so easy to do. You can create your own routine that will detect what the controlled jobs are, attach, issue DSStopJob request and detach, but that's about the only way until you get 7.5 or later.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

Thanks very much Ray!

Code: Select all

Routine activity invoking UtilityAbortToLog will abort the main sequence. But it will not send stop notifications to currently running jobs. 
This is working good! and I can have Routine activity invoking UtilityAbortToLog in the Failed Link and the trigger as OK(Green) link to the next activity...( it's stoping the sequence from running further and aborting the Main...that's what we want... :D

but you know...i was mistaken....
now i am wondering about using Exception handler!

it was not even stoping the sequence from running! even if a job is already in aborted condition

am i missing something on this?

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

Post by ray.wurlod »

It is not the function of the Exception Handler to do anything. Its only task is to detect that one of the activities has not completed successfully and - when that happens - to trigger its output(s). Whatever happens downstream of that is entirely up to the developer. (That's you.)
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