Parallel Execution of Routine in Sequence job

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
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Parallel Execution of Routine in Sequence job

Post by bi_fujitsu »

Hi,

I have sequence having following flow

RTN1----------------------->Job1
RTN2----------------------->Job2
RTN3----------------------->Job3
RTN4----------------------->Job4
RTN5----------------------->Job5
RTN6----------------------->Job6

RTN1 to RTN6 are the routine activity which looks for the Source file and if the file is not present it remains in loop and keeps on looking for the file. Once the file is found it kick off the load jobs. The problem is that if say the file for RTN3 has not arrived and it remains in loop. The RTN4 to RTN6 does not get initiated. My requirement is that if RTN3 goes into loop due to non-availability of the file all the remaining RTN's and their corresponding jobs should get kicked off. RTN3 is just an example it could happen that on some day RTN1 goes into loop due to non-availability of the file.

Please let me know how i can achieve this functionality.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

If you place all these activities in the Job Sequence as is, stick in a Sequencer_Condition linking all the jobs with an "ALL" mode (Followed by a Notification Activity if you need) you should be good.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Post by bi_fujitsu »

I tried using a Sequencer with "ALL" option but its not working.........
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

In the above design, all the Routine_Activities should kick off simultaneously.
Can you provide details as to what is not working?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Post by bi_fujitsu »

The problem is that if RTN3 is looking for file "ABC" and it hasn't arrived then the sequence just waits for the RTN3 to complete but i want that all RTN1 to RTN6 should execute in parallel and if there are source files for all of them except RTN3 it should go ahead execute their individual load jobs also so that in the end i am only left with RTN3 in running condition.
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

Please provide a snapshot of how your design looks like in designer. What narsimha suggested should work.
Attitude is everything....
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

I guess that is because the routines are handled by the sequencer i.e. doesn't spawn a process to do the routine...

Try create a sequential job that runs the routine and the pj then call this sequential job 6 times (assuming you can differentiate with parameters)
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Post by bi_fujitsu »

I am a bit new to Datastage. Can you please eloborate a bit because i am not able to make out how you can call just the routine in a job.

I just want to execute the routines in parallel. What would be the design of my job to call these 6 routines in 6 different jobs.

Thanks for all the support.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Six sequences each invoking routine, those six sequences called from master sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bi_fujitsu
Premium Member
Premium Member
Posts: 46
Joined: Tue Mar 20, 2007 3:30 am
Location: India

Post by bi_fujitsu »

Hi Ray,

Thanks for your support. I did exactly the way you told me and its working now.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Wonder why the design which I suggested did not work for you?
Probably it just needed Ray's touch. :)
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Routines are executed synchronously in the same process as the sequence itself. That is, the sequence waits for a routine to finish before moving on to any other activity.

Placing the routines in separate sequences obviates that wait in the master sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply