Implementing job dependencies in a sequence job

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
sbass1
Premium Member
Premium Member
Posts: 211
Joined: Wed Jan 28, 2009 9:00 pm
Location: Sydney, Australia

Implementing job dependencies in a sequence job

Post by sbass1 »

Hi,

Our job dependencies are something like:

Group1:
JobA
JobB
JobC
JobD
JobE

These jobs are all independent of each other, and I would prefer they run multi-threaded. But, they should all successfully complete before...

Group2:
JobF --> JobG --> JobH --> JobI

These jobs are all dependent on the success of the parent job (creation of surrogate keys). However, different jobs are dependent on jobs in Group1, for example:

JobF depends on A & C
JobG depends on B
JobH depends on all jobs
JobI depends on Job D & E

Once these jobs finish...

Group3:
JobJ
JobK
JobL

These jobs again are all independent of each other, but dependent on the successful run of all jobs in Group2. Again, I would like these jobs to run multi-threaded if possible.

What is the best practice approach for implementing these dependencies in a Job Sequence job? It would be nice if there was a "Container" in which I could drop each group of jobs, with a dependency of the container. But, I don't see this capability in the sequence jobs.

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

Post by ray.wurlod »

Sequencers.

It's not clear whether G depends on F. Does it?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sbass1
Premium Member
Premium Member
Posts: 211
Joined: Wed Jan 28, 2009 9:00 pm
Location: Sydney, Australia

Post by sbass1 »

Yes. F creates SK's based on some NK. G then saves the F's SK as an FK based on the NK.

So F needs to successfully complete before G starts.

Likewise for the other dependent jobs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

         B --+
             |
A --+        +--> G --+
    |        |        |      --> I
    +--> F --+    D --+--> H --> J  
    |                 |      --> K
C --+             E --+
+--> represents an "All" Sequencer
Last edited by ray.wurlod on Thu Mar 12, 2009 2:51 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sbass1
Premium Member
Premium Member
Posts: 211
Joined: Wed Jan 28, 2009 9:00 pm
Location: Sydney, Australia

Post by sbass1 »

So I have to code all dependencies "manually". Bummer.

Was really hoping there was some way to:

* Run A-E concurrently
* Once A-E have finished successfully, run F->G->H->I sequentially
* Once I has finished successfully, run J-L concurrently

Thus the concept of "containers" to hold groups of jobs.

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

Post by ray.wurlod »

Yes but that would take longer and introduce dependencies that don't actually exist, e.g. H depending on A.

Code: Select all

A --+
    |
B --+
    |                        --> J
C --+--> F --> G --> H --> I --> K
    |                        --> L
D --+
    |
E --+
Last edited by ray.wurlod on Thu Mar 12, 2009 2:56 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sima79
Premium Member
Premium Member
Posts: 38
Joined: Mon Jul 16, 2007 8:12 am
Location: Melbourne, Australia

Post by sima79 »

Your concept of "containers" can be implemented by using multiple job sequences.
Job Sequence 1: Run A-E concurrently
Job Sequence 2: F->G->H->I
Job Sequence 3: J-L concurrently

You then need a master job sequence to control the 3 job sequences above. This will have the three job sequences above sequentially linked together.
sbass1
Premium Member
Premium Member
Posts: 211
Joined: Wed Jan 28, 2009 9:00 pm
Location: Sydney, Australia

Post by sbass1 »

Doh! Of course. The "container" is the sequence job itself.

Thanks!
Post Reply