We do several things. We have a modified version of MONJOBMSGW running
that will send emails out for some jobs. We also have one off jobs
that get submitted from the jobs we want to monitor that use QUSRJOBI
to check the job every so often. JOBA submits JOBB and passes it the
job name, number, and user, and then JOBB loops around every so often
calling QUSRJOBI with JOBI0200 as the format. Check position 51 in the
returned data for *ACTIVE to make sure the job is still running. If
it's not, we end the monitor job. Check position 108 for MSGW (or
whatever other status you need to monitor for) and do what you need to
do to notify someone.
Senior Programmer Analyst
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Sent: Wednesday, September 02, 2015 2:32 PM
Subject: Send email on program halt
We want to send an email if our nightly closing/backup stops on any
kind of error. I thought about monitoring for CPF0000 but I think
that will prevent the job from stopping with a MSGW. I still want the
job to stop with MSGW on the line where the error occurred, I just
need some facility to notice that a MSGW condition exists and send an
email. Any suggestions?
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.