Page 1 of 1

Retrieving Job Status through Universe stage

Posted: Fri Oct 02, 2009 6:58 am
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...

Posted: Fri Oct 02, 2009 7:01 am
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.

Posted: Fri Oct 02, 2009 7:13 am
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....

Posted: Fri Oct 02, 2009 7:23 am
by chulett
You can't do that. You need to loop through all jobs and then check their status individually.

Posted: Fri Oct 02, 2009 7:30 am
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)?

Posted: Fri Oct 02, 2009 7:32 am
by chulett
Pretty sure Kim Duke has posted that here somewhere...

Posted: Fri Oct 02, 2009 7:55 am
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%.

Posted: Fri Oct 02, 2009 9:50 am
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.

Posted: Thu Oct 08, 2009 6:58 am
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