Page 1 of 1

how to run datastage job using batch file and running batch

Posted: Wed Nov 05, 2008 7:06 am
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

Posted: Wed Nov 05, 2008 7:17 am
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.

Posted: Wed Nov 05, 2008 7:34 am
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.

Posted: Wed Nov 05, 2008 7:40 am
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

Posted: Wed Nov 05, 2008 8:48 am
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.

Posted: Wed Nov 05, 2008 9:01 am
by chulett
cool wrote:if job status ok then i should display success in output else fail

Sorry, what? "Display success"? :?