That is one of the mods I mentioned below. Just added this one line to
the program and we were good to go.
if (&chkuser *eq 'QSPLJOB') goto endloop

Kevin Bucknum
Senior Programmer Analyst
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Sent: Wednesday, September 02, 2015 3:38 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Send email on program halt

MONJOBMSGW is pretty easy to implement and has no effect on anything
else in the system. Last place I worked used it and I believe still
does. Only drawback might be printers that have paper handling messages
that need a reply and you don't want to be called in the middle of the
night while the warehouse is loading paper. But you can specify up to
50 jobs to be ignored to get around that.

Code is all CL and you could probably tweak if you want something


On 9/2/2015 2:51 PM, Kevin Bucknum wrote:
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.

Kevin Bucknum
Senior Programmer Analyst
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of

James Rich
Sent: Wednesday, September 02, 2015 2:32 PM
To: midrange-l
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?

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.