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
sravanthi
Participant
Posts: 83 Joined: Fri Jun 02, 2006 5:37 am
Post
by sravanthi » Wed Oct 08, 2008 1:13 pm
Hi,
I have a batch script to call a sequencer.It is like :
cd \Ascential\DataStage\Engine\bin
dsjob -run -warn 0 DS-PRJ sequencer
This job has dependency job which should run after this job.
Does this script exits immediately or after successful completion of job.Please let me know
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Oct 08, 2008 1:26 pm
Without one of the 'wait' options on the command line, it will fall squarely into your "exits immediately" camp.
-craig
"You can never have too many knives" -- Logan Nine Fingers
sravanthi
Participant
Posts: 83 Joined: Fri Jun 02, 2006 5:37 am
Post
by sravanthi » Wed Oct 08, 2008 1:29 pm
Thanks Craig
How to add that wait to this script.What is command for that.please advice!
sravanthi
Participant
Posts: 83 Joined: Fri Jun 02, 2006 5:37 am
Post
by sravanthi » Wed Oct 08, 2008 1:30 pm
Thanks Craig
How to add that wait to this script.What is command for that.please advice!
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Oct 08, 2008 1:32 pm
It's all documented in the Server Job Developer's Guide in the Command Line Inteface chapter. Use either "-wait" or "-jobstatus" depending on how you want the exit status handled.
-craig
"You can never have too many knives" -- Logan Nine Fingers
sravanthi
Participant
Posts: 83 Joined: Fri Jun 02, 2006 5:37 am
Post
by sravanthi » Wed Oct 08, 2008 1:40 pm
Craig,
I have modified to dsjob -run -warn 0 -wait DS-PRJ sequencer
Is this enough or do we need some thing else.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Oct 08, 2008 1:44 pm
It's enough as long as you understand the difference between "-wait" and "-jobstatus". Did you read the documentation?
-craig
"You can never have too many knives" -- Logan Nine Fingers
sravanthi
Participant
Posts: 83 Joined: Fri Jun 02, 2006 5:37 am
Post
by sravanthi » Wed Oct 08, 2008 1:52 pm
I did.Wait ...waits for job to complete.
jobstatus waits for job to complete and gives an exit code from job status.Hope it returns 1 which is not complete for other process except data stage.
Not sure how to use jobstatus which returns 0 to indicate job is completed.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Wed Oct 08, 2008 2:03 pm
-wait returns 'normal' exit status codes: 0 for success, non-zero for failure. -jobstatus returns the same code as used internally: 1 = Finished OK, 2 = Finished (see log), 3 = Aborted, etc etc.
-craig
"You can never have too many knives" -- Logan Nine Fingers