Previous Topic

Next Topic

Book Contents

Book Index

Responding to External Events through CMEM

Until now, almost everything you have done in this guide has been connected to the scheduling of jobs under the Control-M monitor. You learned how to define jobs, how to order the jobs, how to check up on, and intervene in, the processing, how to perform restart, and so on.

However, Control-M provides a facility, the Control-M Event Manager (CMEM) facility, that enables Control-M to perform specified actions in response to external events. External events are events in the system that occur outside direct operation of Control-M, such as submission of a job not under the control of the Control-M monitor.

The CMEM facility is comprised of a monitor and a subsystem. The facility employs sets of user-defined rules that specify events to monitor and actions to perform if a specified event occurs.

You can now enter the CMEM facility.

  1. Enter Option C in the IOA Primary Option menu, or =C from any other location. The CMEM entry panel is displayed.

    Figure 54 CMEM Rule Definition Facility – Entry Panel

    ----------------- CMEM RULE DEFINITION FACILITY - ENTRY PANEL --------------(C)

    COMMAND ===>

    SPECIFY LIBRARY, TABLE NAME, RULE NAME

      LIBRARY   ===> CMEM.TEST.RULES

      TABLE     ===>                      (Blank for table selection list)

      RULE      ===>                      (Blank for rule selection list)

    USE THE COMMAND SHPF TO SEE PFK ASSIGNMENT                             22.35.51

    CMEM has a library, member, and rule structure much like the library, member, and job scheduling definition structure of the Scheduling Definition facility.

    This is reflected in the similarity between the Scheduling Definition entry panel and the CMEM entry panel, which has entry fields for LIBRARY, TABLE, and RULE.

    Other screens of the CMEM facility also correspond to those of the Scheduling Definition facility:

    Note: Many commands and options in the corresponding screens are also the same.

    You can now create a CMEM table and rule. Use a test CMEM library if one exists, or use the default CMEM rule library. For the purposes of this guide, you will call this library CMEM.TEST.RULES.

  2. In the CMEM entry panel, enter IDCM1 in the TABLE field, and rule IDRUL1 in the RULE field. Use either the default or a test CMEM rule library. For the purposes of this guide, this library is called CMEM.TEST.RULES.

    Note: If Control-O is installed, your site should not be running CMEM.

    SPECIFY LIBRARY, TABLE NAME, RULE NAME

      LIBRARY   ===> CMEM.TEST.RULES

      TABLE     ===> IDCM1                (Blank for table selection list)

      RULE      ===> IDRUL1               (Blank for rule selection list)

    The Rule Definition is displayed. It immediately displays the following message at the top of the screen:

    IOAE4CE AT LEAST ONE "ON" STATEMENT MUST BE FILLED IN

    The screen is displayed as follows:

    Figure 55 CMEM Rule Definition Screen

    IOAE4CE AT LEAST ONE "ON" STATEMENT MUST BE FILLED IN           TABLE:       

    COMMAND ===>                                                    SCROLL===> CRSR

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

      ON          (JArrival JEnd Dsnevent Step)                                   

      OWNER ID       GROUP                         MODE PROD    RUNTSEC          

      THRESHOLD                                                                  

      DESCRIPTION                                                                 

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

      DO                                                                         

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

    ======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

    FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF,                       01.37.17

    The CMEM rule definition is much simpler than the job scheduling definition. Basically, it enables specification of the following types of parameters:

    The CMEM rule lacks Basic and Runtime scheduling criteria. CMEM tables are usually ordered, or loaded to memory, when CMEM is started. They can also be refreshed or loaded by an operator command, or manually, by using the FORCE option in the CMEM Table List screen.

    A CMEM rule in memory is triggered, that is, all its DO statements are performed, by the occurrence of the events specified in the ON statements of the rule.

    You can now define your CMEM rule. Of course, to define a rule, you need to know its purpose. The rule you are about to define should accomplish the following:

    Job IDEXT1 is a job that is NOT submitted under the Control-M monitor. However, step S2 of job IDEXT1 performs certain processing that is required before certain other jobs can be submitted by Control-M. Therefore, the purpose of the rule is to inform Control-M when step S2 in job IDEXT1 ends OK.

  3. In the ON statement, enter the value STEP. The ON STEP statement is displayed.

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

      ON STEP     =          JTYPE   SMFID      SYSTEM                            

         PROCSTEP            PGMSTEP            STEPRC               And/Or/Not   

      OWNER ID       GROUP                         MODE PROD    RUNTSEC          

      THRESHOLD                                                                  

      DESCRIPTION                                                                 

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

      DO                                                                         

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

    ======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====

  4. Fill in the ON STEP parameters as follows:
    1. Following the = symbol in the ON STEP statement, specify IDEXT1, which is (the job name.
    2. In the PROCSTEP field, specify S2.

      Note: In this screen, the PGMSTEP field comes after the PROCSTEP field, which is the reverse of the positioning of these fields in the Job Scheduling Definition screen.

    3. In the STEPRC field, specify OK.
  5. Fill in the General parameters as follows:
    1. In the MODE field, specify TEST.
    2. In the DESCRIPTION field, specify ON JOB IDEXT1  STEP S2:OK  ADD COND.

    This section is displayed as follows:

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

       ON STEP     = IDEXT1   JTYPE   SMFID      SYSTEM

          PROCSTEP            PGMSTEP S2         STEPRC OK            And/Or/Not

       OWNER ID       GROUP                         MODE TEST    RUNTSEC NONE

       DESCRIPTION ON JOB IDEXT1  STEP S2:OK  ADD COND

       DESCRIPTION

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

  6. In the DO statement, enter COND. The DO COND statement is displayed.

    This statement is similar to the DO COND statement in a job scheduling definition.

  7. Specify IDS2-IDEXT1-OK in the condition field, ODAT in the date field, and + in the action field.

    The statement is displayed as follows:

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

    DO COND     = IDS2-IDEXT1-OK        ODAT +

    DO

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

    The entire rule definition is displayed as follows:

    RL:            LIB CMEM.TEST.RULES                              TABLE: IDCM1  

    COMMAND ===>                                                    SCROLL===> CRSR

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

      ON STEP     = IDEXT1   JTYPE   SMFID      SYSTEM                            

         PROCSTEP            PGMSTEP S2         STEPRC OK            And/Or/Not   

      OWNER ID       GROUP                         MODE TEST    RUNTSEC          

      THRESHOLD                                                                  

      DESCRIPTION ON JOB IDEXT1  STEP S2:OK  ADD COND                            

      DESCRIPTION                                                                 

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

      DO COND     = IDS2-IDEXT1-OK       ODAT +                                   

      DO                                                                         

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

    ======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====

  8. Exit the CMEM definition. The Rule List screen is displayed.

    Figure 56 CMEM Rule List Screen

    RULES OF LIBRARY: CMEM.TEST.RULES                               TABLE: IDCM1  

    COMMAND ===>                                                    SCROLL===> CRSR

    OPT  RULE      TYP -------------- DESCRIPTION ---------------------------------

         IDEXT1     Z ON JOB IDEXT1  STEP S2:OK  ADD COND                        

    ======= >>>>>>>>>>>>>>>>> NO MORE RULES IN THIS TABLE <<<<<<<<<<<<<<<< ======

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

                                                                                 

    OPTIONS:  S SELECT   D DELETE   I INSERT   C COPY                      02.32.23

    In addition to displaying the rule name and description, the Rule List screen also displays the rule type, which in this case is Z. The rule type is determined by the type of ON statement defined. The letter Z is used to indicate that the rule is an ON STEP rule. There are other rule type codes that will be identified later in this chapter.

  9. Exit the Rule List screen. The Exit Option window is displayed.

    Figure 57 CMEM Exit Option Window

    RULES OF LIBRARY: CMEM.TEST.RULES                               TABLE: IDCM1  

    COMMAN +-----------------------------------------------------------+  ===> CRSR

    OPT  R |                 PLEASE SELECT EXIT OPTION                 |  ---------

         i |                                                           |

    ====== |     SAVE    CREATE                                        | << =======

           |                                                           |

           |     LIBRARY CMEM.TEST.RULES                               |

           |     TABLE   IDCM1                                         |

           |                                                           |

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

  10. Enter Y in the CREATE field. The CMEM entry panel is displayed again.

    You can now load to memory the table that contains the rule you just defined.

  11. Ensure the TABLE and RULE name fields are blank and press Enter. The Table List screen is displayed.
  12. Enter Option F (Force) for the table IDCM1. If a Confirmation window is displayed, confirm the request.

    The Control-M CMEM Order Messages screen displays a message indicating that the table is about to be ordered by the CMEM monitor.:

    Figure 58 Control-M CMEM Order Messages Screen

    ------------------------ CONTROL-M CMEM ORDER MESSAGES ---------------(C.ORDER)

    COMMAND ===>                                                    SCROLL===> CRSR

    -------------------------------------------------------------------------------

    02.49.53 MOF15CI TABLE  IDCM1    ODATE 020201 WILL BE ORDERED BY CMEM MON.   

    ======= >>>>>>>>>>>>>>>>>      END OF MESSAGE LIST      <<<<<<<<<<<<<<<< =====

  13. Exit the Control-M CMEM Order Messages screen. The CMEM Table List screen is displayed.
  14. Enter  =4  to check the IOA Conditions/Resources screen for condition IDS2-IDEXT1-OK.

    The condition should not appear because the rule that creates it has not yet been triggered.

  15. Submit the JCL of job IDEXT1. Once Step S2 has ended OK, check again for condition IDS2-IDEXT1-OK in the IOA Conditions/Resources screen.

    The condition does not appear, due to the rule being in TEST mode, as specified in step 5 above. However, if the rule had been defined in PROD mode, the condition would appear, indicating that the CMEM rule detected the successful completion of step S2 and added the specified condition to the IOA Conditions file. Control-M jobs that have this condition as an IN condition can now be submitted, assuming all other scheduling and runtime criteria are satisfied.

Parent Topic

Additional Features