Checking jobstatus

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
harryhome
Participant
Posts: 112
Joined: Wed Oct 18, 2006 7:10 am

Checking jobstatus

Post 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.
Shaanpriya
Participant
Posts: 22
Joined: Thu Sep 11, 2008 11:47 pm
Location: Bangalore

Post by Shaanpriya »

You can put DS Macros in an after job script and get the status.
harryhome
Participant
Posts: 112
Joined: Wed Oct 18, 2006 7:10 am

Post 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?
harryhome
Participant
Posts: 112
Joined: Wed Oct 18, 2006 7:10 am

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply