Controlling the execution of Jobs in Datastage Sequence

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
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Controlling the execution of Jobs in Datastage Sequence

Post by synsog »

Hi Everyone,

We need to design a sequence in such a way that it execute only required jobs and not all attached to that sequence.

Sample Job Flow in Sequence.

Extract --> Transform A1 --> Transform A2 --> Load

Say, Our Sequence is designed to process data for 2 countries A1, A2.

So, when it is running for country A1, it should only execute below flow

Extract --> Transform A1 --> Load **Skipped Transform A2**

And when it is running for country A2, it should only execute below flow

Extract --> Transform A2 --> Load **Skipped Transform A1**

is there a way to achieve this ?

Thanks in Advance!

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

Post by ray.wurlod »

Only ever one country, or possibly both? Either way you set up parameter(s) in the sequence to specify which country/countries, and use trigger expressions - possibly in Nested Condition activities - to specify what is to occur. Is there any dependency (for example country A2 runs only after country A1)? This will affect the design but not the mechanism.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

No - There is no such dependency. This sequence will be automated through scheduler -Which ever country file is created first will get the priority. We have a country code parameter at sequence level to differentiate.

We would have created separate sequence for each country. But in future, we ould be adding more countries. Almost all jobs will remain same. We are expecting only 1 02 jobs to be country specific.

I did not undertood - How to put this iin nested condition.

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

Post by ray.wurlod »

Code: Select all

Nested Condition  ---->  JobA1
#jpCountry# = "A1"

Nested Condition  ---->  JobA2
#jpCountry# = "A2"
Even if the job is multi-instance it can be called from different Job activities with different invocation IDs - possibly the country.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

Can be like this

Code: Select all

Extract --> Nested Condition -->Transform A1 
                               --> Transform A2 --> Seqeuncer(All) --> Load
                               --> Transform AN
In the nested condition activity, in the expression you can give the condition of country code. The above design run the jobs in parallel. If the transformation logic is same but only the country code are different, then you can parameterize it and make the transformer job multi instance.
Thanks,
Prasanna
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The specification was that "only one country will be processed at a time".

While that does not invalidate your design, you've over-fulfilled the requirement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

Specifying any in sequencer will hold good i guess;
Thanks,
Prasanna
Post Reply