Additional Features

This chapter includes the following topics:

Overview

In this, the final chapter of the Getting Started guide, you will examine several topics not covered in the other chapters.

What you learn in this chapter will enable you to

  • create a calendar in the IOA Calendar facility

  • take a look at, and create a rule in, the CMEM (Control-M Event Manager) facility

  • bring a job On Spool in CMEM

  • use batch utility IOACND to clean up conditions and resources

You will also learn about the availability of several miscellaneous facilities.

Preparations

To prepare for the exercises in this chapter

  • create a new table called IDGS4

  • create a new job scheduling definition in table IDGS4, called IDJOB10, with these characteristics:

    • In the MEMNAME field, specify IDJOB10

    • In the GROUP field, specify IDGRP5

    • In the DESCRIPTION field, specify THIS IS JOB10

    • In the OUT field, specify IDJOB10-ENDED-OK ODAT +

  • create a trivial JCL for IDJOB10

  • Create a JCL called IDEXT1

The JCL should contain two steps, S1 and S2, each ending with condition code C0000. There should be no job scheduling definition for this JCL.

Defining Calendars

A calendar definition is a collection of parameters, in calendar form, that is used to indicate on what dates of the year scheduling should occur.

Calendars can be very useful for providing basic scheduling criteria, especially when

  • scheduling dates do not follow a pattern, or follow a pattern that is not easily specified using regular basic scheduling criteria

    An example might be a WORKDAYS calendar that schedules jobs on all weekdays, Monday through Friday, that are not holidays. Creating this schedule using basic scheduling parameters would be problematic. Defining the weekdays is simple enough, but excluding the holidays will be a problem.

  • identical detailed and complex scheduling criteria are used for many jobs

    Instead of detailing the scheduling criteria in the job scheduling definition of each job, the scheduling criteria can be specified once in a calendar, and then only the calendar name need be specified in each the job scheduling definition. An example might be a HOLIDAYS calendar that consists of a number of disparate dates. Specifying this once in a calendar is easier and less error-prone than specifying the same set of dates in many job scheduling definitions.

You can now define a calendar for use in your job scheduling definition.

  1. Enter =8 in the COMMAND field. The IOA Calendar Definition Facility entry panel is displayed.

    In the LIBRARY field is the name of the default calendar library at your site. For purposes of illustration, you will call this library IOA.TEST.CAL.

    Figure 51 IOA Calendar Definition Facility - Entry Panel

    Copy
    --------------------- IOA CALENDAR FACILITY - ENTRY PANEL ------------------(8)
    COMMAND ===>                                                                  
                                                                                  
                                                                                  
                                                                                  
    SPECIFY LIBRARY, CALENDAR, YEAR                                               
                                                                                  
       LIBRARY  ===> IOA.TEST.CAL                                                 
       CALENDAR ===>                 (Blank for calendar selection list)          
       YEAR     ===>                 (Blank for year selection list)              
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    USE THE COMMAND "SHPF" TO SEE PFK ASSIGNMENT                           11.28.41
  2. In the CALENDAR field, enter the name IDCAL1 and press Enter.

    Copy
    SPECIFY LIBRARY, CALENDAR, YEAR                                               
                                                                                  
       LIBRARY  ===> IOA.TEST.CAL                                                 
       CALENDAR ===> IDCAL1          (Blank for calendar selection list)          
       YEAR     ===>                 (Blank for year selection list)              
                                                                                  
    The Calendar Definition screen is displayed for the current year, as indicated by the label under the COMMAND field.
    Figure 52    IOA Calendar Definition Screen
    --------------------------- IOA CALENDAR - IDCAL1   ----------------------(8.Y)
    COMMAND ===>                                                    SCROLL===> CRSR
    YEAR 2001  -                                                                  
                                                                                  
    -----S-------------S-------------S-------------S-------------S-------------S---
           1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1          
    01                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
                 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8          
    02                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
                 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1    
    03                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
         1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +              
    04                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
             1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1        
    05                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
                   1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +    
    06                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
    TYPE  Y  IN ALL THE EXECUTION DAYS                                     11.35.33
  3. Tab to the field next to the year label, and specify GETTING STARTED. The following screen is displayed:

    Copy
    --------------------------- IOA CALENDAR - IDCAL1   ----------------------(8.Y)
    COMMAND ===>                                                    SCROLL===> CRSR
    YEAR 2001  -  GETTING STARTED                                                 
                                                                                  

    Notice the layout of the screen:

    • It is sectioned according to months. Only the first six months are displayed. You can page down to display the next six months.

    • Each section contains three lines:

      • A number line contains up to 31 digits indicating the dates in the month. A plus sign indicates the 10th, 20th and 30th.

      • Directly below the number line is a blank line used for entering a Y value for each date on which scheduling should occur.

      • Directly above the number line is a line containing Ss. Each S indicates either Saturday or Sunday, depending on the defaults defined at your site.

      Normally, you would try to create a logical, useful calendar. However, to keep the definition as simple as possible, you will specify Y only for the date on which you are performing these exercises.

  4. Specify Y in the field that represents the current working date. The Calendar definition should have only one entry:

    Copy
    --------------------------- IOA CALENDAR - IDCAL1   ----------------------(8.Y)
    COMMAND ===>                                                    SCROLL===> CRSR
    YEAR 2001  -  GETTING STARTED                                                 
                                                                                  
    -----S-------------S-------------S-------------S-------------S-------------S---
           1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1          
    01                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
                 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8          
    02                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
                 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1    
    03                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
         1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +              
    04                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
             1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1        
    05           Y                                                                
    -----S-------------S-------------S-------------S-------------S-------------S---
                   1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +    
    06                                                                            
    -----S-------------S-------------S-------------S-------------S-------------S---
    TYPE  Y  IN ALL THE EXECUTION DAYS                                     11.35.33
  5. Exit the Calendar Definition screen. The Year List screen is displayed, listing only the definition you just created.

    Figure 53 Year List Screen

    Copy
    LIST OF YEARS IN IOA.TEST.CAL                                 CALENDAR IDCAL1 
    COMMAND ===>                                                    SCROLL===> CRSR
    OPT  YEAR ----------------- DESCRIPTION ---------------------------------------
         2001       GETTING STARTED                                               
    ======= >>>>>>>>>>>>>>>>  NO MORE YEARS IN CALENDAR     <<<<<<<<<<<<<<<< ======
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    OPTIONS:  S SELECT   D DELETE   I INSERT   W INSERT BY WEEK DAYS C COPY12.02.36

    Exit the Year List screen. The Exit Option window is displayed. Type Y in the CREATE field and press Enter to save this newly created calendar. You can now use this calendar in your job scheduling definition.

  6. From the IOA Calendar Facility – Entry Panel, type =2 in the COMMAND field and press Enter to enter the Scheduling Definition facility.

  7. Edit the job scheduling definition of IDJOB10. In the DCAL field, type IDCAL1 and press Enter, and exit the job scheduling definition.

  8. Order IDJOB10. The job is scheduled, and executed, because the basic scheduling criteria defined in calendar IDCAL1 were satisfied.

    Although you specified only a calendar name in this exercise, calendars can be used in conjunction with other basic scheduling parameters.

    The relationship between DAYS values and the DCAL calendar depends on the format of values specified for DAYS parameter. The same holds true of the relationship between WDAYS values and the WCAL calendar. For details, refer to the description of parameters DAYS and WDAYS in the parameters chapter of the Control-M for z/OS User Guide.

Structure of the IOA Calendar Definition Facility

Before continuing with the exercises, you should note some of the similarities between the structure of the Scheduling Definition facility and the structure of the Calendar Definition facility.

  • Both job scheduling definitions and calendar definitions are stored in members in a library. Therefore, both facilities have corresponding screens at each relevant level.

    • The gateway to both definition facilities is an entry panel that allows specification of a Library, member, and entity, either a calendar year or a job scheduling definition name.

    • The screen at the next level lists the members in the library

      • The Table List screen lists the members in the Scheduling Definition facility.

      • The Calendar List screen lists the members in the Calendar facility.

    • The screen at the next level lists the entities in the member.

      • The Job List screen lists the entities in the Scheduling Definition facility member.

      • The Year List screen lists the entities in the Calendar facility member.

    • The screen at the next level is the definition screen itself.

      • The Job Scheduling Definition screen provides Scheduling Definition facility information.

      • The Calendar Definition screen provides Calendar Definition facility information.

  • The description you provide in the definition screen appears in the Job List screen or the Year List screen.

  • If you create or modify a definition, an Exit Option window is displayed upon exiting the Job List screen or Year List screen to enable you to save or cancel your work.

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

    Copy
     ----------------- 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:

    • Table List Screen

    • Rule List screen, which corresponds to the Job List screen

    • Rule Definition screen, which corresponds to the Job Scheduling Definition screen

      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.

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

    Copy
    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

    Copy
    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:

    • ON parameters specify the situation or event that should trigger the rule.

    • DO parameters specify the actions the rule should perform.

    • General parameters specify general information about the rule. In the screen, the general information appears immediately under the ON statement.

    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.

    Copy
    +-----------------------------------------------------------------------------+
      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.

      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:

      Copy
       +-----------------------------------------------------------------------------+   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:

    Copy
    ===========================================================================
    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

    Copy
    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

    Copy
    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

    Copy
    ------------------------ 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.

Event Types Handled by CMEM - Available ON Statements

You have already seen the ON STEP event. Shown below is a table with the complete list of ON statements available to CMEM.

Table 23 ON Statements Available to CMEM

Event

Description

DSNEVENT

Dataset disposition, whether cataloged, deleted, or kept, during step termination or dynamic decollation, or the occurrence of a NOT CATLGD 2 event, which usually occurs when a dataset name is created in a job step but not cataloged because its name already exists in the MVS catalog. Specified in an ON DSNEVENT statement in the rule.

JOBARRIV

Arrival of a job on the JES spool from any source.

Examples

Jobs submitted by a TSO user or by CICS, or jobs received over an NJE network. Specified in an ON JOBARRIV statement in the rule.

JOBEND

Completion of a job regardless of its source. Specified in an ON JOBEND statement in the rule.

STEP

Termination of a job step. Specified in an ON STEP statement in the rule.

The following list indicates the Rule type code that appears in the Rule List screen, depending on the type of ON statements specified in the rule:

  • R – Job arrival

  • X – Job end

  • D – Dataset

  • Z – Step

CMEM Actions - Available DO Statements

You have already used a DO COND statement in your rule. The following table provides the complete list of DO statements available to CMEM:

Table 24 CMEM Action Parameters

Parameter

Description

DO statement

Action to be performed when the rule is triggered. Subparameters may be displayed. Valid DO statements are:

  • DO COND–Add or delete a prerequisite condition.

  • DO FORCEJOB–Force a job order under Control-M.

  • DO STOPJOB–Stop execution of the remaining steps of the job that triggered the rule.

The following actions can be defined if Control-O is installed:

  • DO RULE–Invoke a Control-O rule from within the current rule.

  • DO SHOUT–Issue a message to a specified destination using the Shout facility.

Creating On Spool Jobs

An On Spool job is an independently submitted job or started task, such as a job submitted by a TSO user, that is brought under the control of the Control-M monitor using a CMEM rule.

Such a CMEM rule must

  • be an ON JOBARRIV rule that is triggered by the arrival of the job on the JES spool

  • have a DO FORCEJOB statement that forces a job scheduling definition that "matches" the arriving job, so that Control-M can use the instructions in the job scheduling definition to control the job

  • The issue of matching the job scheduling definition to the arriving job is discussed in more detail later.

Control-M then controls the entire life cycle of the job, except submission, according to the instructions in the forced job scheduling definition. Because the job has already been submitted, Control-M does not submit the job. However, if the job is held, Control-M releases the job when the runtime scheduling criteria are met.

Defining On Spool Jobs

The following components are necessary to create On Spool jobs:

  • job to be brought On Spool

  • CMEM rule

  • job scheduling definition

The following tables clarify the connections between the components by identifying the values you will specify and the reasons for those values. This understanding should be gained before you create the necessary components.

Table 25 Job To Be Brought On Spool - Values for Exercise

Item

Value

Description

Member

IDEXT2

Name of the JCL member of the External job.

Library

"CTM.TEST.
  JCL"

The test (or personal) JCL library you have been using for these exercises. As in the previous exercises, call it CTM.TEST.JCL

Table 26 CMEM Rule - Values for Exercise

Item

Value

Description

Rule

IDEXP2

Name of rule that will bring job IDEXT2 On Spool.

Member

IDCM1

Rule Table that contains the rule, which is shown in the same table as in previous exercise.

Library

"CMEM.TEST.
  RULE"

CMEM Rule library used in previous CMEM exercise.

ON

ON JOBARRIV
  IDEXT2

On statement in rule that detects the arrival of the external job to be brought on spool.

DO

FORCEJOB

Statement that forces the job scheduling definition that matches the arrived job IDEXT2. TABLE, JOB, and LIBRARY are the relevant subparameters of this statement, and are described below:

TABLE

IDGS4

Table that contains the job scheduling definition.

JOB

IDEXT2

Name of the job scheduling definition that matches the arrived job. If left blank, Control-M will search the specified table for the matching job.

LIBRARY

"CTM.TEST.
  SCHEDULE"

Scheduling library that contains the job scheduling definition.

Table 27 Job Scheduling Definition - Values for Exercise

Item

Value

Description

Jobname

IDEXT2

Name of job scheduling definition. It must match the name of the arrived job.

Member

IDGS4

Name of the table of the job scheduling definition. The table name specified in DO FORCEJOB statement in the rule must point to this table.

Library

"CTM.TEST.
  SCHEDULE"

Scheduling library of the job scheduling definition. The library name specified in DO FORCEJOB statement in the rule must point to this table.

MEMNAME field

IDEXT2

Must point to the JCL member of the arrived job.

MEMLIB field

"CTM.TEST.
  JCL"

Must point to the JCL library of the arrived job.

You can now create the components.

Creating the JCL of the Job

  1. Using the values in the preceding tables, for the JCL job, create the JCL of the job that will be placed on the JES Spool. The job can be a trivial job, but ensure that the job card has the following characteristics:

    • The job should be submitted with TYPRUN=HOLD to delay its execution and permit Control-M to determine when to run the job.

    • The MSGCLASS sysout of the job should be one of the following to enable Control-M to read the sysout for the job and perform postprocessing according to the job scheduling definition:

    • For JES3 users, it must be equal to the Control-M SYSOUT held class.

    • For JES2 users, it can be any held SYSOUT class.

Creating the CMEM Rule

  1. Using the values in the preceding tables, for the CMEM rule, create CMEM rule IDEXP2. Ensure that the rule has the following characteristics:

    • The ON JOBARRIV statement should have the job name value of IDEXT2 after the = symbol. The rest of the fields can be blank.

    • For the General parameters, the OWNER field should contain your user ID, the MODE field should contain the value TEST, and the DESCRIPTION field should say CREATE ON SPOOL JOB.

      This section of the rule is displayed as follows:

      Copy
       +-----------------------------------------------------------------------------+
         ON JOBARRIV = IDEXT2   JTYPE   SMFID      SYSTEM               And/Or/Not
         OWNER ID       GROUP                         MODE TEST    RUNTSEC
         DESCRIPTION   CREATE ON SPOOL JOB
         DESCRIPTION
         ===========================================================================
    • The DO section should contain a DO FORCEJOB statement with the following subparameters:

      • In the TABLE field, IDGS4.

      • In the JOB field, IDEXT2.

      • In the DATE field, ODAT

    • In the LIBRARY field, the scheduling library that contains table IDGS4, which in this exercise is CTM.TEST.SCHEDULE.

    • The DO section is displayed as follows:

      Copy
         ===========================================================================
         DO FORCEJOB = TABLE   IDGS4        JOB IDEXT2               DATE  ODAT
                       LIBRARY CTM.TEST.SCHEDULE
         DO
         ===========================================================================
      The entire rule definition is displayed as follows:
      RL: IDEXT2     LIB CMEM.TEST.RULES                              TABLE: IDCM1  
      COMMAND ===>                                                    SCROLL===> CRSR
      +-----------------------------------------------------------------------------+
        ON JOBARRIV = IDEXT2   JTYPE   SMFID      SYSTEM               And/Or/Not   
        OWNER ID       GROUP                         MODE TEST    RUNTSEC           
        THRESHOLD                                                                   
        DESCRIPTION CREATE ON SPOOL JOB                                             
        DESCRIPTION                                                                 
        =========================================================================== 
        DO FORCEJOB = TABLE   IDGS4    JOB IDEXT2               DATE ODAT           
                      LIBRARY CTM.TEST.SCHEDULE                                     
        DO                                                                          
        =========================================================================== 
      ======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
  2. Exit the Rule Definition screen, and the Rule List screen. In the Exit Option window, save the rule.

Creating the Job Scheduling Definition

  1. Using the values in the preceding tables, for the job scheduling definition, create the job scheduling definition IDEXT2 in table IDGS4. Ensure that the definition has the following characteristics:

    • The MEMNAME field contains IDEXT2.

    • The MEMLIB field points to the JCL library of the arrived job, which in this exercise is CTM.TEST.JCL.

    You can now define the following parameters in this job scheduling definition:

  2. In the GROUP field, specify IDGRP6.

  3. In the DESC field, ON SPOOL EXERCISE.

  4. Fill in the OUT fields with the following values:

    IDEXT2-ENDED-OK ODAT +

    The job scheduling definition is displayed as follows:

    Copy
    JOB: IDEXT2   LIB CTM.TEST.SCHEDULE                             TABLE: IDGS4 
    COMMAND ===>                                                    SCROLL===> CRSR
    +-----------------------------------------------------------------------------+
      MEMNAME IDEXT2      MEMLIB   CTM.TEST.JCL                                  
      OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N                 
      APPL                                GROUP IDGRP6                           
      DESC    ON SPOOL EXERCISE                                                  
      OVERLIB                                                   STAT CAL
      SCHENV                         SYSTEM ID                  NJE NODE      
      SET VAR                                                                    
      CTB STEP AT         NAME            TYPE                                   
      DOCMEM  IDEXT2      DOCLIB   CTM.TEST.DOC                                  
      ===========================================================================
      DAYS                                                          DCAL         
                                                                         AND/OR  
      WDAYS                                                         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       RETRO N MAXWAIT 00  D-CAT                     
      MINIMUM          PDS                                                       
      DEFINITION ACTIVE FROM          UNTIL              
      ===========================================================================
      IN                                                                         
      CONTROL                                                                    
      RESOURCE                                                                   
      FROM TIME         +     DAYS    UNTIL TIME      +     DAYS  
      DUE OUT TIME      +     DAYS    PRIORITY     SAC    CONFIRM 
      TIME ZONE:                                                  
      ===========================================================================
      OUT      IDEXT2-ENDED-OK      ODAT +                                       
      AUTO-ARCHIVE Y          SYSDB    Y      MAXDAYS      MAXRUNS               
      RETENTION:  # OF DAYS TO KEEP      # OF GENERATIONS TO KEEP                
      SYSOUT OP   (C,D,F,N,R)                                              FROM  
      MAXRERUN     RERUNMEM                            INTERVAL         FROM     
      STEP RANGE         FR (PGM.PROC)          .          TO          .         
      ON PGMST          PROCST          CODES                               A/O  
        DO                                                                       
      SHOUT WHEN           TIME       +     DAYS     TO                  URGN
        MS                                                                       
    ======= >>>>>>>>>>>>>>>>>>> END OF SCHEDULING PARAMETERS <<<<<<<<<<<<<<<< =====
     COMMANDS: EDIT, DOC, PLAN, JOBSTAT                                    04.47.20
  5. Exit and save the job scheduling definition.

Bringing the Job On Spool

You can now bring the job On Spool.

  1. Force the table that contains rule IDEXT2 to memory.

  2. Submit the JCL of job IDEXT2, for example, from TSO.

    The CMEM rule detects the arrival of job IDEXT2 on the JES spool, and forces the job scheduling definition of job IDEXT2. Control-M then recognizes this as an On Spool job and tracks and controls the job using the instructions in the job scheduling definition.

  3. Check the job log. The job log indicates the appropriate Control-M handling of the job, depending on the results of the execution (assuming that the rule is in PROD mode).

  4. Check the IOA Conditions/Resources screen.

    The condition IDEXT2-ENDED-OK is displayed in the screen. This indicates that the job was brought under the control of the Control-M monitor.

Additional Points About On Spool Jobs

The following points relate to component definition:

  • The job name specified in the ON JOBARRIV statement in this rule must match the name of the job to be monitored. It can be a full job name, or it can be a mask if a group of jobs is to be monitored.

  • The job scheduling definition must be forced by the first DO FORCEJOB statement in the CMEM rule.

  • The MEMNAME value in the job scheduling definition must match the name of the external job. A mask can be specified in the MEMNAME field if the same job scheduling definition is used for more than one job.

  • Appropriate runtime scheduling criteria for the job must be defined in the job scheduling definition. This enables Control-M to control when the job should be run, that is, its execution.

  • Desired post-processing actions must be defined in the job scheduling definition.

On Spool jobs are handled as follows:

  • When the job arrival event occurs, Control-M forces the requested table or job.

  • If the MEMNAME value in the requested table or job does not match the name of the arriving job, the table or job is forced and processed regularly by Control-M, which presumes that a job is submitted when its runtime scheduling criteria are met, and so on.

  • If the MEMNAME value in the requested table or job matches the name of the arriving job, the job becomes an On Spool job and Control-M

    • replaces the MEMNAME mask, if a mask was specified in MEMNAME, with the name of the arriving job

    • assigns the job ID of the job that triggered the event to the forced job

    • forces the job

For details and exceptions see the discussion of On Spool job scheduling definition considerations in the Control-M for z/OS User Guide.

  • The forced job appears in the Active Environment screen with WAITSCHEDULEONSPOOL as its status.

  • Control-M starts processing the forced job when all runtime scheduling criteria defined in the job scheduling definition are satisfied. If there are no runtime scheduling criteria in the job scheduling definition, Control-M starts processing the job immediately.

  • Control-M looks for the job in the spool and releases it, if required.

    • If the external job is waiting for execution in HELD state, that is, if the job arrives on spool with the TYPRUN parameter set to HOLD, Control-M releases it for execution.

    • Otherwise, Control-M verifies that the job is still in the spool, and is waiting for execution, executing, or ended, before performing postprocessing.

  • Control-M waits for the job to finish execution, reads its SYSOUT, analyzes the execution results, and performs all the postprocessing actions defined in the job scheduling definition.

By default, Control-M can only handle On Spool jobs that originate on the same NJE node on which Control-M is running.

Batch Utility IOACND

Utility IOACND is a utility that is generally included in New Day processing but can also be run throughout the day on an as-needed basis. The utility adds, verifies the existence of, deletes, or modifies prerequisite conditions and resources in the IOA Conditions file and/or the Control-M Resources file. It can be activated as a started task (STC), from TSO, or from within a user program.

A copy of the utility is pre-supplied with Control-M. You need only provide the desired control statements, as discussed below:

  1. In the pre-supplied copy of the utility, add the following control statements under the EXEC statement:

    Copy
      ADD    COND IDGS-MONITOR-UP %%OMONTH.%%ODAY
      DELETE COND IDJOB10-ENDED-OK %%OMONTH.%%ODAY
      CHANGE RESOURCE IDTAPE 3
      ADD CONTROL IDDATA1 E

    This job must be submitted through Control-M to resolve the AutoEdit variables.

  2. Submit the utility.

  3. Enter the IOA Conditions/Resources screen.

    • Condition IDGS-MONITOR UP appears with the current ODATE.

    • Condition IDJOB10-ENDED-OK with the current ODATE no longer appears.

    • Three units of quantitative resource IDTAPE appear in the screen.

    • Control resource IDDATA1 has been assigned Exclusive control.

Take a closer look at the control statements you can use in this utility. All control statements must have the following format:

action entity_type entity_name  qualifiers

where

  • action can be one of the following:

    • ADD         Valid for any entity type.

    • DELETE    Valid for any entity type.

    • CHECK      Valid for COND only. Verifies that the condition exists.

    • CHANGE    Valid for RESOURCE only. Changes the resource quantity.

  • entity_type can be one of the following:

    • COND            For prerequisite conditions

    • RESOURCE    For quantitative resources

    • CONTROL     For control resources

  • entity_name is the name of the condition or resource.

  • qualifiers depend on the entity type, as indicated in the following table:

Table 28 Qualifiers and Entity Types

Entity Type

Qualifier

Description and Valid Values

COND

cond_date

Condition date. Valid values are:

literal – mmdd or ddmm site format

DATE – Current Gregorian date

WDATE – IOA working date

STAT – static date.

RESOURCE

resc_quantity

Resource quantity. In either of two formats:

n (integer, such as 2 or 3). Valid for ADD and DELETE actions.

+/- n (such as -2 or  +3). Valid for CHANGE actions. It specifies the amount and direction of the change.

CONTROL

control_type

Type of Control. Valid values are:

E – Exclusive

S – Shared

Note the following points about utility IOACND:

  • It can be activated as a started task (STC), from TSO, or from within a user program.

  • The addition, deletion, modification or verification is recorded three ways:

    • in the job sysout

    • as a message on the operator console

    • as an event in the IOA Log file.

  • Parameters can be received by the utility in two ways:

    • using DDstatement DACNDIN (or SYSIN)

    • using PARM.

      The parameters required depend on whether prerequisite conditions, control resources or quantitative resources are being processed.

  • If it is necessary to add, delete, verify, or modify prerequisite conditions or resources during a job step, CTMCND can be called as a procedure from within the application program.

IOA Online Utility I1, which is described in the IOA Utilities chapter of the Control-M for z/OS User Guide, can be used for adding, deleting or checking a prerequisite condition in the IOA Conditions file.

Miscellaneous Facilities

The following facilities may prove of special interest to you. There are no exercises to perform regarding these facilities, and you can find their descriptions in the appropriate guide. They are listed below to ensure you know they are available.

Some of the following descriptions are taken from the introductory chapter of the Control-M for z/OS User Guide.

History Jobs File

During New Day processing, jobs that have ended OK or whose retention period has expired, according to job scheduling definition parameters, are deleted from the Active Jobs file.

If Control-M/Restart is installed, these jobs can be placed in the History Jobs file during New Day processing. This is an optional feature that can be activated by the INCONTROL administrator. Activation of this feature is described under parameter HIST in the Control-M chapter of the INCONTROL for z/OS Administrator Guide.

Jobs in the History Jobs file can be restored, by request, to the Active Jobs file, for subsequent restart.

Jobs remain in the History Jobs file until they are deleted according to criteria defined in the job scheduling definition.

The contents of the History Jobs file can be viewed from the History Environment screen, as described in the online facilities chapter of the Control-M for z/OS User Guide

Journaling and Restoration Capability

The Control-M Journal file collects data about changes in the Control-M Active Jobs file, the IOA Conditions file, and the Control-M Resources file that occur during the Control-M working day.

The Journal file is initialized each day during New Day processing. From that point on, for the rest of the working day, the Control-M monitor records in the Journal file all job processing activities that impact the Control-M Active Jobs file, and all prerequisite condition additions to and deletions from the IOA Conditions file and the Control-M Resources file.

If the Control-M Active Jobs file, and optionally, the IOA Conditions file and the Control-M Resources file, need to be restored, for example, following a system crash, utility CTMRSTR can be run to restore the files. The utility uses data from the Journal file to restore the files to the status they had at any specific time after the last run of the New Day procedure.

The Control-M Journal file is initialized each day during New Day processing. Therefore, the time at which the New Day procedure initialized the Journal file is the earliest time to which the Control-M Active Jobs file, the Control-M Resources file, or the IOA Conditions file can be restored.

Journaling and Restoration is an optional feature that can be activated by the INCONTROL administrator. It is described in the Control-M chapter of the INCONTROL for z/OS Administrator Guide, and activation of this feature is described under parameter JRNL in the chapter on installing Control-M in the INCONTROL for z/OS Installation Guide.

Accumulating Statistics: Statistics Facility

As part of the postprocessing for each job, Control-M determines the elapsed run time of the job. All accumulated information regarding job execution, including the elapsed run time, is written to the IOA Log file.

Periodically, statistics utility CTMJSA, which was mentioned in Chapter 6, "Navigating The Active Environment," and which is described in detail in the Control-M chapter of the INCONTROL for z/OS Utilities Guide, can be used to scan and analyze the IOA Log file. This utility gathers information about start time, elapsed run time, CPU utilization time, and so on, for each job. The utility places this information in the Statistics file, where averages of these values can be maintained for each job.

Statistics facility averages can be used for several purposes, such as

  • determining if the execution time of a job falls outside a statistically normal range of time, which would indicate an execution delay or problem

  • determining when a shout message should be issued based on the elapsed time of a job

  • simulating job executions and forecast the impact of changes to the system.

  • determining if a job can complete execution before the Control-M planned shutdown time (QUIESCE command)

  • calculating DUE-IN time for use by the Deadline Scheduling facility

For more information, see the discussion on Automatic Job Flow Adjustment in the introductory chapter of the Control-M for z/OS User Guide.

Automatic Tape Adjustment

The Automatic Tape Adjustment facility collects and analyzes statistics regarding tape drive usage, and automatically allocates the appropriate number of tape drives at job order time. This facility, which can be implemented by your INCONTROL administrator, overrides any tape drive Quantitative resource value specified in the job scheduling definition. For more information, see the discussion about tape device usage statistics in the description of the Statistics screen and the description of the RESOURCE parameter in the Control-M for z/OS User Guide.

Simulating Job Execution and Forecasting Resource Usage

Using statistics accumulated by the Statistics facility, the Simulation and Forecasting facility simulates the actions of the Control-M monitor under the conditions specified in simulation parameters.

The Simulation and Forecasting facility enables you to forecast anticipated job load for a specified time in the future, and to forecast the effects that possible changes to the system might have.

The Simulation and Forecasting facility can improve the efficiency of your site. It can help with resource and configuration decisions, and it can help with the planning of workload scheduling to achieve maximum utilization of resources.

The Simulation and Forecasting facility is described in the chapter on the Simulation and Forecasting facility in the Control-M for z/OS User Guide.

The facility utilizes the Simulation and Forecasting procedure that can be activated by online utility CTMCSIM, which is run by Option M3 in the IOA Utility menu. This utility, which can also activate the Tape Pull List procedure, is described in the IOA Utilities chapter of the Control-M for z/OS User Guide.

Control-M/Restart Dataset Cleanup Utility CTRCCLN (R2)

Utility CTRCCLN, the Control-M/Restart Dataset Cleanup Utility, is used to manually request dataset cleanup. The utility places a CONTROLR step in the job stream and submits the job. The CONTROLR step performs the dataset adjustment, including step adjustment, if necessary, and then stops. No further job steps are executed. The utility adds a step that prevents the execution of the other steps in the job.

This utility can be requested by entering option R2 in the IOA Utility menu. The utility is described in detail in the CONTROLR step chapter of the Control-M/Restart User Guide.

Reporting Facility

Control-M supports a comprehensive reporting facility, which can produce the following types of reports:

Table 29 Report Types

Reports Description
Keystroke Language Reports

These are reports generated with the Keystroke Language (KSL). KSL is a general purpose reporting language, based on the Online facility, capable of producing numerous reports from the database.

Special Purpose Reports

These reports include the Job Flow reports that are generally used to track the dependencies between jobs, and the Job Plan reports that are used to anticipate which jobs are scheduled each day.

Sample reports are provided in the IOA SAMPLE library. The Reporting facility is described in the Keystroke Language (KSL) chapter of the Control-M for z/OS User Guide. Special purpose reports are described in the INCONTROL for z/OS Utilities Guide.

Exit the Online Session

  1. Exit the Online facility.

    This completes the steps in this chapter of the Control-M for z/OS Getting Started Guide.

Review

In this chapter you

  • created a calendar in the IOA Calendar facility and used it to schedule a job

  • created a CMEM table and rule, and loaded the rule to memory

  • used a CMEM rule to bring a job On Spool in CMEM

  • used batch utility IOACND to cleanup conditions and resources

  • learned about the following facilities and capabilities

    • History Jobs File

    • Journaling and Restoration Capability

    • Accumulating Statistics: Statistics Facility

    • Automatic Tape Adjustment

    • Simulating Job Execution and Forecasting Resource Usage and utility CTMCSIM

    • Control-M/Restart Dataset cleanup utility CTRCCLN

    • Reporting Facility

Recommended Reading

It is recommended that you read the following: