Hi,
I've been tasked with finding a way to notify relevant people the moment
when *any* job goes into the MSGW status. The notification has to tell
those people which job is in the MSGW status, when it entered that status
and what the MSGID is (I also don't want to spam them with notifications!).
I am not interested in notifying anyone about jobs in the QSPL subsystem,
but apart from that I want notification for any batch or interactive job on
the local machine requiring a user's response to a message.
I've put together a small routine that loops forever using the QUSLJOB API
which works (thanks to Eric Pell), but I'd prefer a different approach
because continuously reading the job list over and over just seems like an
awkward way to do what I want. Is there a way to have a program called (or
dtaq/file added to) when any job in the system goes into the MSGW status?
Trigger, or exit point, etc?
Any tips, ideas, web searches I may have missed?
-Paul.
PS Eric Pell's code, an adjustment to code from "jamief", can be found
here:
http://www.code400.com/forum/forum/tips-techniques-tools-announcements/tips-for-the-iseries-as400/1227-use-the-qusljob-api-to-whip-thru-wrkactjob?p=51441#post51441
As an Amazon Associate we earn from qualifying purchases.