Hello, im back to this problem, and im trying to do what ArndW said, search in the log entries to find which child has aborted from a parent sequence.
This is what i have so far:
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSJ_XFUNCS.H
*get parent job handle
JobHandle = DSAttachJob(Arg1,DSJ.ERRNONE)
*get first and last eventID from the lastest execution
IdList = DSGetLogEventIds (JobHandle, 0, "S")
FirstLog = LEFT(IdList,4)
LastLog = RIGHT(IdList,4)
*Create a list of aborted childs
Found = ""
FOR Counter = FirstLog TO LastLog
*get summary from log
Info = DSGetLogEntry(JobHandle,Counter)
Detail = FIELD(Info,"\",4)
*If some Detail contains "status = 3 (Aborted)", get the job name
IF Detail MATCH "...'status = 3 (Aborted)'..." then
*Found some aborted job, store it
Found = Found:",":MATCHFIELD (Detail, "...'Job '...' has'", 1)
NEXT Counter
But, im having some problems to get the job name from a log summary.
Example:
"SeqDataWarehouse..JobControl (DSWaitForJob): Job SeqDimension has finished, status = 3 (Aborted)" is a example line which contains a aborted child.
But i can't figure out how MATCHFIELD() works, does it accept 'text' entries?
Another further question, how to make this routine recursive? I still don't get it either
![Confused :?](./images/smilies/icon_confused.gif)