Previous Topic

Next Topic

Book Contents

Book Index

Execute a KOA Script in a Special Server

The example in Figure 113 shows how a KOA script is run in a Special server and used to check whether or not CICS is responding.

Figure 113 Example of Executing a KOA Script in a Special Server

RL: CHCKCICS   LIB CTO.PROD.RULES                               TABLE: CICS

COMMAND ===>                                                    SCROLL===> CRSR

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

ON EVENT    = CHCKCICS

OWNER IOAADMIN  GROUP                         MODE LOG     RUNTSEC

THRESHOLD

DESCRIPTION EXECUTE A KOA SCRIPT TO CHECK WHETHER CICS IS RESPONDING

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

DO KSL      = CICSKOA

   WAITMODE   Y                                      TIMEOUT         STOP Y

   INITPROC   CICSP1        SHARELOC N               IMMEDIATE N

IF       %%$KSLRC NE 0

DO SHOUT    = TO OPER              URGENCY R SYSTEM            CTO282I

   MESSAGE CICS PROD IS IN TROUBLE - PLEASE CHECK

ENDIF

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

DAYS                                                          DCAL

AND/OR

WDAYS   ALL                                                   WCAL

MONTHS  1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y

DATES

CONFCAL          SHIFT

ENVIRONMENT SMFID      SYSTEM

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

IN

TIME FROM 0700 UNTIL 1800      INTERVAL 002  PRIORITY     CONTINUE SEARCH Y

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

Explanation

If it is important to you to know if CICS is responding at your site, a rule such as this one can help you track CICS response. This EVENT rule is triggered every two minutes (specified by the value set in the INTERVAL parameter) between the hours of 7 a.m. and 6 p.m. (specified by the FROM and TO parameters).

A KOA script is used to check whether or not CICS is responding:

DO KSL=CICSKOA

This statement activates the specified KOA script (CICSKOA).

INITPROC   CICP1

The INITPROC subparameter is used to specify a Special server where the KOA script should be run. Use of a Special server can reduce possible delays in script execution.

For more information about Control-O servers, see Chapter 5, "Control-O Servers,".

An IF statement checks the %%$KSLRC System variable, which contains the return code of the KOA script.

If the return code is not 0 (meaning that the script did not end OK), the operator is informed by a SHOUT message.

Parent Topic

Working With Control-O Rules