Page 1 of 1

Capturing the job status (When running ) in UNIX

Posted: Tue May 05, 2009 3:08 am
by Roopanwita
Hi,

In our project, we need to capture the name of DataStage job those are in running state.(writing the name of the jobs in a file those running at a particular time). We can capture the Status of a Datastage job through Shell script using dsjob -report function when job is in Finished Ok/with warning or Aborted stage.

How to capture the running job through shell script?


Thanks in advance,

Roopanwita

Posted: Tue May 05, 2009 6:11 am
by shalini11
You can check the status of the job.

status=`$DSHOME/bin/dsjob -server ${DS_SERVER} -user ${DS_USER} -password ${DS_PWD} -jobinfo ${DS_PROJ} ${DS_JOB} | grep "Job Status" | tr ')' '(' | cut -f2 -d'('`


For running job, the status should be 0.