Page 1 of 1

Checking jobstatus

Posted: Fri May 14, 2010 1:36 am
by harryhome
Hi,


I have set of jobs which will be scheduled. Also a control table which stores the job status for each job on every run. When set of jobs will be running in a sequencer before each of those job run, a entry is made in cotrol table with few details like jobname,starttime,etc...
Also will check from the table if last is completed or not, if job is still running then it will not beinvoked again.

How to get the Jobstatus and store in the table when a job finishes, so that status can be checked before running same job in next schedule.

Posted: Fri May 14, 2010 1:42 am
by Shaanpriya
You can put DS Macros in an after job script and get the status.

Posted: Fri May 14, 2010 2:37 am
by harryhome
Instead of writing script. Is there any way where the status of another job can be obtained and can be stored in the control table?

Posted: Fri May 14, 2010 2:44 am
by harryhome
How to get Jobstarttime and Jobendtime for another job (not the same job where control tables are updated)? as DSJobStartTimestamp will give it for same job, but for others?

Posted: Fri May 14, 2010 6:04 am
by ray.wurlod
Yes. The easiest way is to refer to the $JobStatus activity variable downstream of the Job activity in a sequence. Otherwise you can create a routine using the DataStage API and calling DSGetJobInfo() to obtain the required information. You will, in this case, need to have attached the job to the routine first, and to detach it afterwards.