Invoke more jobs from command line without waiting

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
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Invoke more jobs from command line without waiting

Post by sangi1981 »

Hi All,
I have a question.
I want to run more instance of same job in parallel from within a script: I have a loop in which I invoke jobs with dsjob and without option "-wait" and "-jobstatus".

I want that jobs completed before script termination, but I don't know how to verify if job instance terminated.
I though to use wait command but it is not appropriate.

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

Post by ray.wurlod »

You need to poll interrogating job status until job status is no longer DSJS.RUNNING.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

May be you can write a script to check if you have a process DSD.RUN for that particular job .
Nag
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Post by sangi1981 »

I changed perspective for this task.
Instead of wait for a dsjob launch to complete, I created a parametric shell script that launch dsjob command.
I exec this script from another, and I apply wait command.
It seems more clean and with minus code to implement for every check.

What do you think about this solution?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That seems like a perfectly valid alternative.
-craig

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