Trigger the list of jobs at the same time

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
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Trigger the list of jobs at the same time

Post by SURA »

Hi All

If i get a list of independent job names; Is there is any way, where i can trigger the list of jobs at the same time.

Example:
Job List
A
B
C

Trigger
A B C

Notes: Not to use Sequence, becaue the job list may vary.

I am in the plan to go for an approach like, create "N" number of batch files for those jobs and trigger the *.bat may trigger at the same time.

But i trust someone might came across this approach / someone might have good approach than this.

Better i can get some good suggestions from 'Gurus'.

Thanks in advance,
DS User
Last edited by SURA on Tue Apr 05, 2011 11:24 pm, edited 1 time in total.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Call the dsjob command (dsjob.exe in windows) to submit your jobs. Syntax is available by entering dsjob without any parameters.

Plenty of examples in the forum here for the searching, such as this one

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Hi James

Thanks for your guidance.

You asked to go for dsjob -run command to trigger from OS level. Am I right?

If so, how to run more than one job?

Please make me clear.

Sorry

DS User
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Hi James

Sorry. I got it. I check the syntax and came to know how it will work.

I do have one more question. I will post is soon.

Thanks a lot.

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

Post by ray.wurlod »

Unless you have a multi-threaded scheduler you're never going to get more than one job to start at precisely the same time. It really doesn't matter anyway, because of variability in job startup times. It's enough to have them start very close together.

The easiest way to do this is to schedule them all to start at the same time. Use any scheduler you like but (as noted) if the scheduler itself is single threaded, then only one job will start, then the next, and so on.

Another approach would be to have each job start whenever but all SLEEP until the agreed time before continuing to process. Using this technique the first row processed by each job will be as close as possible to that in any of the other jobs.

Not really sure why you need this, however.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Hi Ray

I totally agree with your point. In the present project,

1. Not decided to use any scheduling tool
2. Not decided to use Sequence
3. Every day will get a list of jobs to run (some day the list may vary)
For example
Job -------- Dependency Job Name
A----------------No Dependency
B-----------------A
C-----------------B,A

With good number of restrictions, i thought of to go for an approach like below.

1. Findout the list of jobs which all are not dependent to any other jobs, trigger the jobs at the same time (Yes slight variation in start time, but dosent matter)
2. Find the list of jobs which all are dependent, can trigger at the same time, but with wait for trigger file option.
3. Which all are the jobs completed will create a trg file at the end of its completion, can be used by wait for file options to trigger.

Is there is any better way to handle this situation.

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

Post by ray.wurlod »

I just scheduled four jobs for the same time from the DataStage Director. To the nearest minute (that is, as far as anyone could tell by looking at Director) they all started at the same time and they all ran concurrently.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

But is the right approach what i am trying to do, refering t

Post by SURA »

Thanks Ray

But is the right approach what i am trying to do, refering to my previous comment?

Thanks
DS User
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Adding in dynamic dependancies like that is a complete game changer and goes well beyond simply triggering 'a list of jobs at the same time'. It can certainly be done and Ken Bland's KBA Job Control Utility has been doing exactly that for quite a number of years. Rolling your own would be both an interesting and daunting task.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply