How to write condition for stopping the sequences

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
nexus2me
Participant
Posts: 5
Joined: Mon Sep 10, 2007 10:23 pm

How to write condition for stopping the sequences

Post by nexus2me »

How to write condition for stopping the sequences..

for ex:- suppose there are three jobs activities is there in sequence

Like this type

A ---> B ----> C

i want to run A and C .. Not B then how to write trigger condition...
Havoc
Participant
Posts: 110
Joined: Fri Nov 24, 2006 8:26 am

Re: How to write condition for stopping the sequences

Post by Havoc »

nexus2me wrote:How to write condition for stopping the sequences..

for ex:- suppose there are three jobs activities is there in sequence

Like this type

A ---> B ----> C

i want to run A and C .. Not B then how to write trigger condition...
Put a nested condition activity stage after the job A...
put a trigger for C where the A.JobStatus < 3
and for Job B put the A.JobStatus = 3

The above will ensure:

Job C runs if Job A ran successfully but will not run Job B
Job B runs if Job A aborted and Job C will also not run in this case
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change the job sequence design. I am inferring that you want to run B if A aborts or C if A succeeds. All you need is separate triggers out of A.

A -----> C
|
|
V
B

The trigger from A to C is a custom trigger with the expression A.$JobStatus = DSJS.RUNOK Or A.$JobStatus = DSJS.RUNWARN while the trigger from A to B is an Otherwise trigger.
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 »

Or if you typically run all three and sometimes need to skip B, use Sequencer and Nested Condition to evaluate if B should run or not:


Code: Select all

A   -->  NC -->   B  -->  Seq/Any --> C
          |                   ^
          +-------------------+
-craig

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