Capturing the job status (When running ) in UNIX

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Capturing the job status (When running ) in UNIX

Post 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
shalini11
Participant
Posts: 74
Joined: Thu Jan 22, 2009 3:00 am

Post 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.
Post Reply