We are running jobs under a Basic Routine (RunJob) that handles - amongst other things - the analyze of job status after a run.
Routine goes like this:
*--
Apparently when no fatal errors are found the routine returns the very first logentry regardless of type.case Status = DSJS.RUNWARN
* check whether some fatal errors are generated even the job is not aborted
* get the list of fatal errors...
LogIdList = Ereplace(DSGetLogEventIds(hJob1, 0, 'F') , \"\\\" , @FM, 1)
if LogIdList # -99 then
* DSGetLogEventIds returns -99 if no messages found
* .. and get the first error message - it's the real error
LogId = LogIdList<1>
AnalyzeError = @True
end else
Call DSLogWarn(\"Job had warning(s)...\", ROUTINE.NAME)
Exit
end
*--
It seems status ends as DSJS.RUNWARN ( I hope since entry from job itself says:
Job ItemPzn.ALL has finished, status = 2 (Finished with warnings)
Nevertheless the errormessage created is the first entry in logfile
Job has error - last error text:
Starting Job ItemPzn.ALL.\n
$DB2CODEPAGE = 1208\n
SERVER_OW = OW**AS00\n
LIB_OW = DATA\n
USER_ID_OW = dwhprod\n
PWD_OW = ********\n
SERVER_STAGING = *******\n
LIB_STAGING = STAGING_P1\n
USER_ID_STAGING = *******\n
PWD_STAGING = ********\nP_
JOB_ID = 2003-06-24 10:00:00\n
DSJobController = DSRunJob.ItemPzn_ALL
*--
Has it to do with LogIdList # -99 ??
Any input is appreciated