A powerful feature of AOF rules is the ability to process inline, or synchronously, as an event occurs. Such realtime automation is possible because AOF rules execute in the address space from which an event occurred. Furthermore, the design of the OPS/REXX functions and host environments used in AOF rules not only lets you synchronously issue WTOs and system commands, but obtain vital system-related data needed to make programmatic decisions as an event occurs.
The only type of automation that you cannot perform in rules is interactive automation or automation that requires waiting. Examples are:
Note: If no reply interrogation is needed, then issue the WTOR directly from the rule.
Note: If no command response interrogation is needed, then issue the command directly from the rule. Also, verify that no OPS/REXX built-in function exists for the type of command you are attempting to interrogate. For example, to see if a job is active, you can use the synchronous OPSTATUS built-in function in the rule, rather than invoking an OPS/REXX program in a server to issue the z/OS DISPLAY ACTIVE command.
You can perform automation of this type by scheduling an OPS/REXX program to a CA OPS/MVS server. Use the OPS/REXX ADDRESS OSF host environment, as shown in this example:
)MSG IST521I
)PROC
/* React to GBIND failures if the from node is A45PROD. */
/* The logic of this rule simply interrogates the message */
/* text to see if this is a GBIND failure for the A45PROD */
/* node. If it is, then we need to trigger an EXEC called */
/* IST521I to run in an OSF TSO server. This is needed */
/* because we need to issue VTAM commands and interrogate */
/* the command output, and waiting can't be done from */
/* within the AOF rule environment. */
/* */
/* IST521I GBIND failed for ISTCOS from A45PROD to A04X99 */
FROMNODE = WORD(MSG.TEXT,7)
TONODE = WORD(MSG.TEXT,9)
if FROMNODE ¬= 'A45PROD' then /* NOT A45PROD */
RETURN
/* Trigger OPS/REXX program IST521I in OPSOSF TSO server */
/* passing it the nodes as arguments. IST521I would be */
/* located in the OPSEXEC or SYSEXEC concatenation of the */
/* OPSOSF procedure. */
ADDRESS OSF
"OI PROGRAM(IST52I1) ARG("NODE1 NODE2") "
Note: For details on calling OPS/REXX programs, see the Command and Function Reference.
|
Copyright © 2011 CA.
All rights reserved.
|
|