I am trying to get the JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
and then checking the status as follows
If JobStatus = DSJS.RUNFAILED Then
Reply = DSSendMail(InputArg)
End
but the status check is not working..
Is it something that we cant' check the status in the after job subroutine
CAn we capture the JOBSTATUS in After job subroutine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Tue Jan 24, 2006 9:11 am
-
- Participant
- Posts: 42
- Joined: Tue Jan 24, 2006 9:11 am
Re: CAn we capture the JOBSTATUS in After job subroutine
Thanks, now got it done though a seaprate subroutine
anshumangupta1206 wrote:I am trying to get the JobStatus = DSGetJobInfo(JobHandle, DSJ.JOBSTATUS)
and then checking the status as follows
If JobStatus = DSJS.RUNFAILED Then
Reply = DSSendMail(InputArg)
End
but the status check is not working..
Is it something that we cant' check the status in the after job subroutine
wed
hi anshumangupta1206,
I have noticed that the Job Report when executed in an After-job routine (DSMakeJobReport using handle DJS.ME) captures the correct job status. At least this is true when outputing an XML job report - I have not tested the other report levels.
It would be possible for you to extract the job's status from the job report and use the extracted value for the decision to send a mail.
katz
I have noticed that the Job Report when executed in an After-job routine (DSMakeJobReport using handle DJS.ME) captures the correct job status. At least this is true when outputing an XML job report - I have not tested the other report levels.
It would be possible for you to extract the job's status from the job report and use the extracted value for the decision to send a mail.
katz
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can do this by asking for the "interim status" - the status that the job would have if its after-job subroutine weren't keeping it running.
Code: Select all
DSGetJobInfo(DSJ.ME, DSJ.JOBINTERIMSTATUS)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.