BVSTools recently announced the release of Job Watch (JOBWATCH) v5.0 which allows you to monitor message queues and send alerts or run programs depending on the criteria set up for the monitor. This feature requires V7R2 or higher.
To get started, use the JOBWATCHCF command to enter the Job Watch Configuration screen. You are presented with the main Job Status Maintenance screen which allows you to set up monitors for when jobs enter a specific state (ie, MSGW).
Press the F7 function key and you will be taken to the Job Watch MSGQ Maintenance screen. When the software is delivered there are sample configurations included (yet not active, active monitors are listed in yellow) that you are able to use as a template if you wish. One calls a program and the other a command. Sample programs are also included in source physical file member QRPGLESRC in the JOBWATCH library.
To create a new monitor, enter option 1 on the top blank line. You can enter a message queue name, message type, message severity and start your command or you can leave all of these blank for now. When you hit enter you will be taken to a screen where you can enter details for your specific monitor.
You also can use option 3 next to an existing monitor to copy that specific monitor and use it as a starting point.
On the details screen you are presented with all of the available options to use when setting up a message queue monitor as well as the command or program to run. Most of these options are self-explanatory but let's focus on a couple of them that aren't:
All of the other options allow you to enter a specific value, or the special value of *ALL, including Message Type. If you wish to monitor for multiple message types, but not all of them, the interface makes it easy to make one monitor for a specific message type and then copy it many times to set the message type to other message types you wish to monitor for.
When you are done and returned back to the message queue monitor screen, make sure that your new monitor is active. If the MSGQ Name column is yellow, it is active. Use option 5 next to a monitor to activate or deactivate it.
More information, including the available replacement values can be see in the JOBWATCH documentation. And as always free free to contact us with any questions or issues.