Previous Topic: )eventtype eventspec—Event Definition Section (Required)

Next Topic: )INIT—Initialization Section

)PROC—Processing Section

The processing section of a rule specifies the actions that the rule takes in response to the AOF detecting the system event that is defined in the event definition section. This section can contain actions of varying complexity.

The processing section is optional. If included, the processing section always follows these sections:

The processing section has the following format:

)PROC
/* Insert processing section actions */

Example: )PROC Section

The processing section in the following example uses a combination of AOF tools (REXX, AOF variables, OPS/REXX host environments) to send an alert message to the sysplex master console if job PRDCICSA abends.

)MSG IEF450I
)INIT
/* This code will fire ONCE when the rule is enabled    */
if OPSINFO('SMFID') <> 'SYSA' then
  Return 'REJECT'
TABENDS = 0

)PROC
/* This code will fire each time AOF detects an IEF450I */
/*  message event on the system.                        */
TABENDS = TABENDS + 1
if MSG.JOBNAME <> 'PRDCICSA' then
  return
parse var MSG.TEXT . 'ABEND=' ABEND
CONSOLE = OPSINFO('MSTCONSNM')
ADDRESS WTO
"MSGID(OPSAUTO1) TEXT('PRDCICSA ABEND CODE=",
ABEND" at "TIME()" ') HILITE CNNAME("CONSOLE")"