need help -- dsjob -run

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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

need help -- dsjob -run

Post by sravanthi »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

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 »

Thanks Craig

How to add that wait to this script.What is command for that.please advice!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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 »

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
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

-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
sravanthi
Participant
Posts: 83
Joined: Fri Jun 02, 2006 5:37 am

Post by sravanthi »

Thanks
Post Reply