Running DOS Commands parallely

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
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Running DOS Commands parallely

Post by asitagrawal »

Hi,

I have 3 MS-DOS commands, which I want to run in parallel.
I approached like this:
Created a sequence.
Added 3 Command Stages to it and ran the commands.
The commands were triggerred in parallel as desired.

Due, to some reasons, I need to run the same commands from
a routine, so I approached like this:
Created a rotuine, which takes in the command ( with params ) as
the input arg, which calls DSExecute() to run the command.

Now, I created a new sequence.
Added 3 routine activity stages to it, passing the different commands as different parameters to the same routine.
But now, the 3 commands are not running in parallel now.
i.e the routine is not triggering parallely to run the 3 different input commands as desired.

Please explain.

Thanks and Regards.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do you mean to say, one wait till the other one finishes?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

yes, the one DOS command is waiting for the previous one to finish.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

On Unix you can stick a '&' in between the commands to fire them simultaneously. Try that on DOS.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yah, go ahead - I dares ya. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

hey am sorry to change my reply..

still the sequence of execution depends on the sequence of commands separated by '&'.

My target is to break this sequence.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about three Execute Command activities in a job sequence, with NO LINKS between them?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It would be nice to know what solved your problem. Its one of the things we do here, share solutions.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply