Restartablity of sequence

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
shrinivas
Participant
Posts: 53
Joined: Mon Sep 18, 2006 3:42 am
Location: hyd

Restartablity of sequence

Post by shrinivas »

Hi Guys ,
I have problem on restarting sequnce.

My Sequence structure is like this

Code: Select all

   A---->B---->C
My requirment is that If my Job "B" fails the Job "C" should be run but the sequence should be restartable from job "B" . That means whatever the result of Job "B" the job "C" should always run , and sequence should be restartable from Job "B" as job "B" has failed.

What options do i have? Please help.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Put B and C in a second sequence job and call that sequence job in your first sequence job. SOmething like

Code: Select all

A---->D
Execption Handler----->Terminator 

D=  B ------>C
      ------>C----->Terminator Activity
Make the first sequence job that contains A and D restartable. And the second one remains without having the restartability.

In the second sequence, from B to C, the trigger will be OK and for the second it will be 'Aborted'.
This way if job B aborts, it will still run job C and then terminate the sequence, which will send a red signal to your first sequence which will cause that to abort as well. Stick in an exception handler connected to Terminator stage in your first sequence to abort which sequence D aborts. This will leave your first sequence in a restartable state as well as run job C regardless of the status of Job B.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rafik2k
Participant
Posts: 182
Joined: Wed Nov 23, 2005 1:36 am
Location: Sydney

Post by rafik2k »

1. In job properties of sequence check Add checkpoints so sequence is restartable on failure

2. Add a link of terminator activity at job B, select in properties of terminator activity as Abort without sending STOP request.

So in your case job C will still run even though job B fails
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

But the job sequence wont be restartable from point B, will it? as its successor job (Job C) will run.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shrinivas
Participant
Posts: 53
Joined: Mon Sep 18, 2006 3:42 am
Location: hyd

Post by shrinivas »

Thanks guys .....I got my solution from your replies. What I have done is

Code: Select all

 A---->B---->C----> Terminator Activity
I am using Check point in the sequence. I removed check point from the Job C . Trigger for the Terminator Activity I have customed the condtion to check the failed status of job B. So even job B fails ..it runs Job C and then aborts the sequence using terminator activity . So when I restart the sequence It starts from Job B and then again rerun the Job C.

Once again thanks guys for ur help
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

shrinivas wrote:I have customed the condtion to check the failed status of job B.
All that should need is an Unconditional trigger.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shrinivas
Participant
Posts: 53
Joined: Mon Sep 18, 2006 3:42 am
Location: hyd

Post by shrinivas »

Putting Unconditional trigger will always abort my job after running the job C . But what I need is If Job B fails ,run the Job C and then only aborts the sequence . If Job B is run succesfully then Run job C and End the sequence as completed succesfully. Correct me if I am wrong .
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

An 'unconditional' trigger between B and C just says to run C regardless of what happens to B. Nothing more, nothing less. That's the only point I was making here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply