How to skip a job in a sequence based on data?

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
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

How to skip a job in a sequence based on data?

Post by vamsi_4a6 »

The source is Oracle and this is source for Job A:

col1,col2,Indicator
1,a,J
2,b,J
3,c,H
4,d,H

For first two records (where Indicator=J) I need to trigger 3 jobs A, B and C
and for last two records (where Indicator=H) I need to trigger 2 jobs A and C.

How to do above requirement in job sequence?

Tried below thing:
start_loop activity-->Job A-->job B-->Job C-->end_loop activity

Loop will iterate for 2 times and during first iteration I will identify J records by passing J as parameter and then I will trigger jobs A, B and C.
and during second iteration I will identify H records by passing H as parameter and then I need to trigger Job A and C. How do I skip this job B for H records?

[Note: Example cleaned up considerably due to confusing nomenclature - Andy]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

JobA   ----->  NestedCondition --->  JobB
                      |                |
                      |                |
                      |                V
                      +-----------> Sequencer  ----->  JobC
                                      (any)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
atul9806
Participant
Posts: 96
Joined: Tue Mar 06, 2012 6:12 am
Location: Pune
Contact:

Post by atul9806 »

Use the nested condition in trigger.

Job A - need to run in all case
Job B - need to run when Indicator is J but not when Indicator is H
Job C - need to run in all case

Code: Select all

Loop Start --->Job A ---> If Indicator is J ----> Job B   -------
                          If Indicator is H -----> job C <------|
                                                  |
                                                  |
                                            Loop End
~Atul Singh
<a href=http://www.datagenx.net>DataGenX</a> | <a href=https://www.linkedin.com/in/atulsinghds>LinkedIn</a>
Post Reply