how to run datastage job using batch file and running batch

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
cool
Participant
Posts: 2
Joined: Wed Nov 05, 2008 6:01 am

how to run datastage job using batch file and running batch

Post by cool »

how to run datastage job using batch file and running batch file from database

batch file code needed

if job run successfully it should prompt me suceess else fail
COOL
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. The command is dsjob - you can search DSXchange or the Server Job Developer's Guide (look for Command Line Interface) for examples of how to use it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:? How is this a "workaround"? That is the answer. And searching the forums here for dsjob will reveal complete examples of job launching scripts. Granted, mostly UNIX scripts but not impossible to convert to batch files if you don't have anything like the MKS Toolkit installed.

Plus you'll either need a Sequence job or custom job control code to do the notification in the case of failure. The former would be easier to arrange with the Notification Activity stage or your launching script could do the same - assuming "prompt me" means "notify me".

You'll also need to explain what "running batch file from database" means, I for one prefer not to guess.
-craig

"You can never have too many knives" -- Logan Nine Fingers
cool
Participant
Posts: 2
Joined: Wed Nov 05, 2008 6:01 am

Post by cool »

i trying out in dos command prompt batch file

dsjob command in dos worked fine

now my requiremnt is
to write code in dos command batch file
if job status ok then i should display success in output
else fail
COOL
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need to learn how to drive dsjob which is why I provided the manual reference. This command can be asked to set its exit status to that of the job that was requested to be run.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

cool wrote:if job status ok then i should display success in output else fail

Sorry, what? "Display success"? :?
-craig

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