Count of parallel instances that are running

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
dsscholar
Premium Member
Premium Member
Posts: 195
Joined: Thu Oct 19, 2006 2:45 pm

Count of parallel instances that are running

Post by dsscholar »

Hello,

We have to write a multi-instance job that should be triggered based on a run-time parameter. So if at run time we want the job to run for 2 subscribers, it should be triggered 2 times parallely, however if this count it more than 5, then we want to queue up the jobs.

So the first 5 jobs should be triggered simultaneously, but the 6th one should start only after one of the currently running jobs have completed. So on and so forth..

I read through the forum and figured that we can probably achieve this by putting a nested condition and counting the number of instances of the job that are currently executing.

Can someone please help me with how can i get the number of instances that are currently executing of a particular job?

Your help is much appreciated!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

DSGetJobInfo(hJob, DSJ.JOBINVOCATIONS)
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