Previous Topic

Next Topic

Book Contents

Book Index

Overview

Control-O can automatically perform actions based on the occurrence of messages or events. The variety of possible actions is enhanced by use of the AutoEdit facility.

When Control-O handles DO actions, ON statements and IN conditions, the contents of the subparameters are scanned for special symbols, starting with %%. These symbols are analyzed, edited and automatically assigned new values. The modified statement is then activated. The contents of the original statement remain unchanged.

Note: Unlike DO statements, which are resolved at rule execution, IN conditions and ON statements are resolved at rule ordering.

Using the AutoEdit facility in a rule definition provides great flexibility in condition specification and action definition. For example:

User-defined AutoEdit variables can be defined as local, global, and XAE global. Local variables are stored on one machine, with changes affecting only a rule running on that machine. Global variables are stored in a common storage area on a machine. Changes to a Global variable can be accessed by all rules on that system. XAE Global variables can be accessed by all rules running on any system in a Sysplex. For more information about the XAE facility, see Using an XAE AutoEdit Variable Database.

Note: User-defined AutoEdit variables to be used in ON statements and IN statements must be defined as Global.

Global variables can be used:

There are several categories of AutoEdit symbols

The following Rule Definition screen displays examples of AutoEdit symbol types. For information about reserved user-defined variables, see Reserved User-Defined Variables.

Figure 244 AutoEdit Symbol Types Example

RL: DFS810A    LIB CTOP.V610.RULES                            TABLE: JOB

COMMAND ===>                                                 SCROLL===> CRSR

+--------------------------------------------------------------------------+

ON MESSAGE  = DFS810A

JNAME          JTYPE      SMFID        SYSTEM          USERID

ROUTE          DESC       CONSOLEID    CONSOLE

APPEARED       TIMES IN      MINUTES                        And/Or/Not

OWNER IOAADMIN GROUP                         MODE PROD    RUNTSEC

THRESHOLD

DESCRIPTION IDENTIFY IMS IS READY (KEEP REPLY NUMBER + SIGNAL CONTROL-M)

DESCRIPTION

===========================================================================

DO SET      = %%J = %%$JOBNAME                                    GLOBAL  N

DO SET      = %%COUNT_%%J = %%COUNT_%%J %%$PLUS 1                 GLOBAL  Y

DO SET      = %%REPLY_%%J = %%$REPLY                              GLOBAL  Y

DO SET      = %%PREF = %%$SUBSTR %%$JOBNAME 1 3                   GLOBAL  N

DO COND     = %%%J_IS_DOWN         STAT -

DO SHOUT    = TO TSO-%%PREF        URGENCY R SYSTEM          CTO282I

MESSAGE %%$JOBNAME ACTIVE

DO

===========================================================================

FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF, SCHED, OPT         11.51.00

The first DO SET statement defines a local user variable named %%J. It is assigned the value of the %%$JOBNAME System variable that is the name of the job issuing the message.

The second DO SET statement defines a Global user variable named %%COUNT_%%J. The variable resolves into the name of the IMS that has started, for example, COUNT_IMS1. The %%$PLUS AutoEdit operator increments the variable by 1. This Global variable serves as a counter of the number of times that IMS has been started.

The third DO SET statement defines a Global user variable named %%REPLY_%%J, which is used to keep the open reply number of IMS (from the %%$REPLY System variable).

The fourth DO SET statement defines a local user variable named %%PREF using the %%$SUBSTR function to extract a prefix (the first three characters of the job name). This prefix is used in the following DO SHOUT statement to send a message to a specific TSO user.

The DO COND statement deletes a prerequisite condition in the IOA Conditions file. The prerequisite condition name is defined by an AutoEdit variable.

Parent Topic

AutoEdit Facility