Hello James

We use STRWCH to monitor specific MSGs and call a Watch Program that
sends mail and (via Mail2SMS service) SMSs when these MSGs occur .
We developed it for night time batch jobs but it operates around the clock.
These "Watches" are loaded in QSTRUP PGM.
example:
SBMJOB CMD(STRWCH SSNID(WATCH_MSG1) +
WCHPGM(QGPL/WATCH_PGM1) + WCHMSG((RNQ0231 *NONE *MSGDTA *ALL
*GE + 00) (RNQ0232 *NONE *MSGDTA *ALL *GE 00) +
(RNQ1216 *NONE *MSGDTA *ALL *GE 00) + (RNQ0102 *NONE *MSGDTA
*ALL *GE 00) + (RNQ0121 *NONE *MSGDTA *ALL *GE 00)))
+ JOB(STRWATCH) JOBQ(QSYS/QUSRNOMAX) + USER(AS400)


IBM uses many such Watches - use WRKWCH WCH(*ALL) to see all.
Try WRKWCH WCH(*STRWCH) to see your "private" Watches only.

If you want code samples let me know and I'll e-mail you.

Gad





date: Wed, 2 Sep 2015 13:31:44 -0600 (MDT)
from: James Rich <james@xxxxxxxxxxx>
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?

James Rich

if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev

This thread ...


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

This mailing list archive is Copyright 1997-2019 by midrange.com 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].