Running a job when an existing job finishes

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
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Running a job when an existing job finishes

Post 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?
Phil Hibbs | Capgemini
Technical Consultant
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Phil,

you can always use a job sequence to do this, that is your easiest solution.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, then it sounds like you are doomed. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post 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:
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You also need a DSWaitForJob
dsxuserrio
Participant
Posts: 82
Joined: Thu Dec 02, 2004 10:27 pm
Location: INDIA

Post 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.
dsxuserrio

Kannan.N
Bangalore,INDIA
Post Reply