How to abort master sequnce if child sequnece aborts

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

How to abort master sequnce if child sequnece aborts

Post by palak08 »

Hi,

I have a sequnece which is calling 5 inner sequences.

For each inner sequence I have coded-

Code: Select all

If sequence fails then send email else go to next sequence.
Now Can I send abort status to master sequence if inner sequnece fails in this scenario?
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

As per your code the master sequence will not be aboeted since you are handling the abort of inner sequence in form of a email.
If you check the Log Warnings check box in master sequence , you will get a warining message whenever your inner sequence si finished with status other than ok.
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Or unhandle the child sequence abort by removing the failure email, thus your master sequence will get aborted whenever your child sequence aborts
Last edited by major on Tue Dec 07, 2010 3:08 pm, edited 1 time in total.
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Post by palak08 »

So if I send email in case of failure then master sequence will never show as aborted. In that case I will not have restartability feature for this sequence.

Note: Inner and outer , both sequences send mail in case of failure.
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

palak08 wrote:So if I send email in case of failure then master sequence will never show as aborted. In that case I will not have restartability feature for this sequence.
Yes , I think restartability will work only if a sequnce aborts not in other cases
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You could follow the Notification activity with a Terminator to force the sub-sequence to abort. But you don't really need to - the parent sequence can detect if a sub-sequence finished with warnings, and can (be programmed to) react accordingly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

major wrote:Yes , I think restartability will work only if a sequence aborts not in other cases
Correct. A Sequence job must have checkpoints enabled and have aborted to be in an Aborted/Restartable status which then means it can pick up from where it left off when you run it next. This regardless of it being a 'master' sequence or a 'sub' / 'child' sequence.
-craig

"You can never have too many knives" -- Logan Nine Fingers
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Post by palak08 »

Okay, So according to your suggestions I used terminator stage to abort a job after sending email.
Now when job fails then it shows status as aborted/restartable.

So after that I did following steps:
1. Changed failed job, compiled it.
2. Compiled the sequence job.
3. Ran sequence job

But when I run sequence job, it runs from first job again and not from where it failed.

Question: How to restart a sequence job from where it failed when status is aborted/restartable?
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Don't compile it (or reset it). Just run it.

Mike
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Post by palak08 »

Thanks Mike for your reply.
If I don't compile and run it then it gives me error:
"Job is not in runnable state."
Mike wrote:Don't compile it (or reset it). Just run it.

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

Post by ray.wurlod »

The Job activities that run the subsequences need to have "reset if required, then run" option selected.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Post by palak08 »

Thanks Ray.
I tried that option as well. It does not run. But when I put entire sequence inside Another sequence and run then it runs fine, even without reset if required,then run option.

ray.wurlod wrote:The Job activities that run the subsequences need to have "reset if required, then run" option selected. ...
Post Reply