Previous Topic

Next Topic

Book Contents

Book Index

Example

This rule implements a user-defined command to check if a specific job is active. The job name is extracted from the text of the user command, and the D A z/OS command is issued for this job in command-response mode. For each response message issued, DO statements between DO COMMAND and ENDMSG suppress the message, and check if the job name appearing in the message is the requested job. The DO SHOUT statement after ENDMSG informs the operator of the status of the job after all messages have been intercepted.

Figure 151 DO ENDMSG Parameter Example

RL: CHKACT*    LIB CTO.PROD.RULES                               TABLE: JOB

COMMAND ===>                                                    SCROLL===> CRSR

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

  ON COMMAND  = CHKACT*

     JNAME          JTYPE         SMFID        SYSTEM       USERID

     ROUTE          DESC          CONSOLEID    CONSOLE

     APPEARED     TIMES IN      MINUTES                          And/Or/Not

  OWNER IOAADMIN GROUP                         MODE PROD    RUNTSEC

  THRESHOLD

  DESCRIPTION CHECK IF SPECIFIC JOB IS ACTIVE

  DESCRIPTION

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

  DO SET      = %%JNAME = %%$V2                                     GLOBAL  N

  DO SET      = %%JSTAT = INACTIVE                                  GLOBAL  N

  DO COMMAND  = D A,%%JNAME

     WAIT        CONSOLEID    CONSOLE          SYSTEM

     WAITMODE   Y             WAITRESP Y            TIMEOUT

     RESPMSG

  IF       %%$W2 %%$M* EQ %%JNAME

  DO SET      = %%JSTAT = ACTIVE                                    GLOBAL  N

  ENDIF

  DO DISPLAY  = SUPPRESS A ROUTE     DESC    CONSOLEID    CONSOLE

     SYSTEM

  ENDMSG

  DO SHOUT    = TO OPER              URGENCY R SYSTEM            CTO282I

     MESSAGE JOB %%JNAME IS %%JSTAT

  DO

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

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

Parent Topic

DO ENDMSG: Automated Console Action Parameter