CA OPSMVS : How to include a Wait/Delay command in a MSG rule
Article ID: 101838
CA OPS/MVS Event Management & Automation
Sometimes it could be necessary to build for example a MSG rule that will wait a short duration of time prior to entering a specific command.
CA OPSMVS provides the OPSWAIT function that suspends processing of the program or rule for a specified period in an OPS/REXX program or REQ rule. It can be used in OPS/REXX, AOF rules, TSO/E REXX, or CLIST but it does not work outside a REQ rule. It is documented in Command and Function Guide. One of the main restrictions it has is that it cannot be used in any type of rule other than an REQ rule. The use of OPSWAIT in a TOD rule delays the execution of other TOD rules. The specification of OPSWAIT in any other type of rule is ignored. In addition it is not possible to include a WAIT in a rule as this would affect OPS execution and performance so this is ignored.
How to build a rule which will wait a short duration of time before executing a specific command, avoiding to cause a performance problem in product execution?
Z/OS - OPSMVS
A possible way to accomplish this is to create a new REXX program that can be call for example SLEEPSEC REXX and that will contain all the actions to be executed after the WAIT, that will be the first statement of the REXX. In this way the OPSMVS rule would only call the SLEEPSEC REXX and finish without any other actions. If it would be necessary to pass parameters to the REXX, this can be done in the OI statement in the following way: