Previous Topic

Next Topic

Book Contents

Book Index

User-Defined Commands and Confirmation of a Command Request

The example in Figure 111 demonstrates how a rule is used to create user-defined operator commands. This example also demonstrates how a rule can ask for confirmation of a specified command.

Figure 111 Example of User-Defined Commands and Confirmation of a Command Request

ON COMMAND  = SHUTSYS

   JNAME          JTYPE         SMFID        SYSTEM       USERID

   ROUTE          DESC          CONSOLEID    CONSOLE

   APPEARED     TIMES IN      MINUTES                          And/Or/Not

OWNER IOAADMIN GROUP                         MODE LOG     RUNTSEC

THRESHOLD

DESCRIPTION REQUESTING OPERATOR CONFIRMATION

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

DO DISPLAY  = SUPPRESS Y ROUTE     DESC    CONSOLEID    CONSOLE

   SYSTEM

DO ASKOPER  = ENTER "YES" TO CONFIRM SHUTSYS REQUEST, OTHER TO CANCEL

ROUTE       CONSOLEID    CONSOLE                          TIMEOUT 9999

IF       %%$RPLYTXT EQ YES

DO COND     = CTO-SHUTSYS-ISSUED   STAT +

ELSE

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE SHUTSYS REQUEST WAS CANCELED BY OPERATOR REQUEST

ENDIF

Explanation

ON COMMAND=SHUTSYS

This statement can be used to define new operator commands. When the operator requests the command specified in an ON COMMAND statement (in our example: SHUTSYS), the rule is triggered.

DO ASKOPER=...

The operator is asked to confirm (or reject) the command using a WTOR message.

The %%$RPLYTXT System variable contains the operator’s response to the DO ASKOPER message.

An IF condition is used to select the appropriate action dependent on the operator response (%%$RPLYTXT).

Parent Topic

Working With Control-O Rules