Situation alerts are often the most effective mechanism to use in OMEGAMON to generate alerts. Situations offer the most flexibility, any item of information that appears in a portal workspace may typically be incorporated into a situation alert.
Plus, situations may drive automated actions. If a situation is true, the situation may be enabled to issue a command. In the context of z/OS, that would mean a command to the z/OS console.
But, what if instead of a z/OS console command you want to submit a batch job? Well, you can do that too. Here's how. It uses a method similar to how IMS starts message regions by using IEBGENR to read JCL and send the JCL to an internal reader.
In the following example we see a policy with an action command. In this example, the policy is issuing a command to start a PROC called POTWKLD, and passing the member name to submit (meaning the batch job to submit), in this example the job is in member DB2READI. You also see an example of what the PROC looks like, and how it is set up to pass the member name to submit the batch JCL.
That's it! This technique will work with a situation action, just as it does here with a policy action.