Retrieving Job Status through Universe stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Retrieving Job Status through Universe stage

Post by wbeitler »

Hi All,

trying to retrieve the Job Status through a Universe Stage. As it is not stored in the DS_JOB ther must be another place... But hey... Where's that ?!

William

PS documentation-suggestions on DS_JOBS and alike are also welcome...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The internal hashed fiiles / tables such as DS_JOBS and the RT_STATUSnnn file are not documented by IBM so there will be little help forthcoming there, albeit a search of DSXchange will give you a lot information.

The correct way of getting the status is to use the DSGetJobInfo() routine instead of looking at the status file contents.
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Post by wbeitler »

The correct way of getting the status is to use the DSGetJobInfo() routine instead of looking at the status file contents
Agree... Problem is I want to loop through the list of jobs that didn't finish correctly (And then take all the warnings from the log and put those in a seperate HTML-file... ) Got that last part up and running for any named job... Just need to create me a list of all 'jobs in error' through a select like:

SELECT NAME
FROM DS_JOBS
WHERE STATUS <> 'Ok'

or alike....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't do that. You need to loop through all jobs and then check their status individually.
-craig

"You can never have too many knives" -- Logan Nine Fingers
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Post by wbeitler »

I was afraid so...

How bout a DS_JOBS query that recursively finds me all the underlying jobnames of a named sequence (which I do have)?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Pretty sure Kim Duke has posted that here somewhere...
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's also the dssearch command but that relies on the metadata in the Sequence job, specifically the information on the Dependencies tab that isn't always 100%.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a post on how to get the job names out of a sequence. There is no post or job to do this recursively.
Mamu Kim
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Post by wbeitler »

Worked my way around it by only checking a given Sequence. This fits the customers purposes. Query used to select Jobs in Sequence (thanks to kduke):
select
DS_JOBS.NAME JobName FMT '40L'
FMT '40L'
from
DS_JOBOBJECTS,
DS_JOBS
where
DS_JOBOBJECTS.OLETYPE = 'CJSJobActivity'
and DS_JOBS.NAME = ':1'
and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO
;

tnx again.

William
Post Reply