Batch in Parallel

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
Naveen
Premium Member
Premium Member
Posts: 15
Joined: Sat Jan 07, 2006 10:51 pm

Batch in Parallel

Post by Naveen »

Hi,

Can anyone tell how the batch in Parallel executes. As i tried with removing the "DSwait for Job" job control to run the batch in parallel. I want the status of the job to show Finish Status

Thanks
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Welcome aboard. You should consider creating a loop to periodically check the status of the started jobs using the documented APIs. When you notice a job has now finished, take the appropriate action. The DSWaitForJob API is an infinite routine which waits forever for the controlled job to finish. It's not very elegant if you want to start several jobs at once and then wait for them all to finish.

If you don't like the looping structure (best recommendation) then you could move all of the DSWaitForJob statements to the bottom of your Batch job, so that all jobs get started first. At the bottom, you put all of the waiting and checking statements. Not as elegant as the first recommendation, but you will get your block of jobs started and running before waiting.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Re-organize the code in the batch so that, instead of Run Wait Run Wait, it goes with Run Run Wait Wait. It's up to you where you test the exit status (though obviously it must follow the appropriate DSWaitForJob).

Try to start using job sequences. They offer everything the batch mechanism does (except the ability to create in Director) and a whole lot more besides. Also, if "they" ever decide to change the underlying language, you are insulated from that decision.
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