Capturing part of job log using routine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
Capturing part of job log using routine
Hi,
I want to capture part of job log(e.g - job has finished /aborted - with error msg line) using a DS ROUTINE.
My actual requirement is ,in a Sequence I m sending a mail notification after successful competion of process & if it abort in any intermediate stage ,then it send a failure msg.
Rather than going into job log ,i want to know it from mail msg.
Thanks in advance
I want to capture part of job log(e.g - job has finished /aborted - with error msg line) using a DS ROUTINE.
My actual requirement is ,in a Sequence I m sending a mail notification after successful competion of process & if it abort in any intermediate stage ,then it send a failure msg.
Rather than going into job log ,i want to know it from mail msg.
Thanks in advance
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
Last edited by Roopanwita on Thu Jun 19, 2008 10:00 pm, edited 1 time in total.
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
-
- Participant
- Posts: 106
- Joined: Wed Oct 04, 2006 5:21 am
Change the EventDetail = DSGetLogEntry(handleJob, DSJ.LOGFATAL)Roopanwita wrote:Hi,
I wrote a Routine
$INCLUDE DSINCLUDE JOBCONTROL.H
Ans=0
Erroid = 0
ErrorDetail=0
JobName= ' '
handleJob = DSAttachJob(JobName, DSJ.ERRNONE)
If NOT(handleJob) Then
Errorid = -99
End
Else
/*Ans = DSGetJobInfo(handleJob, DSJ.LOGFATAL) */
Errorid = DSGetNewestLogId (handleJob, DSJ.LOGFATAL)
EventDetail = DSGetLogEntry(JobHandle, DSJ.LOGFATAL)
End
DetachResult = DSDetachJob(handleJob)
But it is not working.
Can you help me to fix it.
Thanks in advance.
JobHandle not declared before
-
- Participant
- Posts: 106
- Joined: Wed Oct 04, 2006 5:21 am
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
Last edited by Roopanwita on Thu Jun 19, 2008 10:01 pm, edited 1 time in total.
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
Last edited by Roopanwita on Thu Jun 19, 2008 10:20 pm, edited 1 time in total.
-
- Participant
- Posts: 106
- Joined: Wed Oct 04, 2006 5:21 am
DSGetLogEntry() This function requires two parameters one is job name anithor one is EventID .Roopanwita wrote:I want Error detail
My code looks like
$INCLUDE DSINCLUDE JOBCONTROL.H
Ans = 0
Errorid=0
ErrorDetail=0
jobname=' '
handleJob = DSAttachJob(JobName, DSJ.ERRNONE)
If NOT(handleJob) Then
Errorid = -99
Ans = DSGetJobInfo(handleJob, DSJ.LOGFATAL)
Errorid = DSGetNewestLogId (handleJob, DSJ.LOGFATAL)
EventDetail = DSGetLogEntry(handleJob, DSJ.LOGFATAL)
End
DetachResult = DSDetachJob(handleJob)
/*Reply = DSSendMail(Ans)*/
DSGetLogEntry(handleJob, Errorid) use this it should work now.
and finally assign the Ans to EventDetails
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
-
- Participant
- Posts: 125
- Joined: Mon Sep 11, 2006 4:22 am
- Location: India
Hi,
Thanks for help.
I have checked with Notification Activity Stage. It sends the status msg (like finished successfully/finisished with warning/Aborted) only.
I want to capture the error msg line(in case of fatal error) from the job log, so that in case of job failure i can understand the reason of failure rather than going & checking it from job log...
Thanks for help.
I have checked with Notification Activity Stage. It sends the status msg (like finished successfully/finisished with warning/Aborted) only.
I want to capture the error msg line(in case of fatal error) from the job log, so that in case of job failure i can understand the reason of failure rather than going & checking it from job log...