Page 1 of 1

Running a job when an existing job finishes

Posted: Thu Mar 24, 2005 9:14 am
by PhilHibbs
I have a job running. I want another job to start when it finishes. Am I doomed to hitting refresh in DataStage Director?

Posted: Thu Mar 24, 2005 9:39 am
by ArndW
Phil,

you can always use a job sequence to do this, that is your easiest solution.

Posted: Thu Mar 24, 2005 9:50 am
by PhilHibbs
ArndW wrote:Phil,

you can always use a job sequence to do this, that is your easiest solution.
I don't think that helps when the first job is already running.

Posted: Thu Mar 24, 2005 10:00 am
by chulett
Well, then it sounds like you are doomed. :wink:

Posted: Thu Mar 24, 2005 11:00 am
by chucksmith
You could write some job control to call DSAttachJob and DSGetJobInfo to return the status of the currently running job. When the status is DSJS.RUNOK, you can start your next job. :wink:

Posted: Thu Mar 24, 2005 11:05 am
by Sainath.Srinivasan
You also need a DSWaitForJob

Posted: Sat Mar 26, 2005 3:27 pm
by dsxuserrio
Looks like it is an adhoc requirement before close of business before going home.

You can try this

Code: Select all

l
$DSHOME/DSEngine/bin/dsjob -jobinfo $PROJECT $JOBNAME | grep "Job Status"  
Use a sleep and repeat every 10 seconds.
If the result is Run With Warnngs " or whatever you decide accordingly and kick off the next job.