Scheduling Definition and Manual Intervention

This chapter includes the following topics:

Overview

In the previous chapter, you were introduced to the Scheduling Definition Facility and the Active Environment screen. In this chapter, you will

  • take a much closer look at the job scheduling definition screen, the sections into which it is divided, and the many of the fields of those sections, including a focus on

    • Basic Scheduling parameters

    • Runtime Scheduling parameters

    • Post-Processing parameters

  • view the scheduling plan of a job in a graphic calendar display

  • force a job whose basic scheduling criteria are not satisfied

  • use the Why screen, IOA Conditions/Resources screen, and the Zoom screen to intervene when a job is not submitted

Preparations

In this chapter, you are going to create two new jobs and their job scheduling definitions. In the last chapter, you used the names IDJOB1 and IDJOB2. In this chapter, you will use the names IDJOB3 and IDJOB4, respectively. (You will use the same library and table that you used in the last chapter.)

For the JCL of IDJOB4, use a copy of the same trivial JCL that you used for IDJOB1 & IDJOB2—that is, a job that does basically nothing, but ends successfully.

For IDJOB3, you need a JCL that will result in an error condition. For this purpose, you will use a test utility in which you indicate the desired error return code.

You can now create the JCL for those jobs.

  • Create trivial job IDJOB3 to run utility TESTUTIL and define it to return a condition code of C0008.

  • Create trivial job IDJOB4 and define it to run IEFBR14.

Sections of the Job Scheduling Definition

  1. Enter the IOA Online Facility and request the Scheduling Definition facility.

    The Scheduling Definition entry panel is displayed.

  2. Enter your library and table names in the LIBRARY and TABLE fields, and IDJOB3 in the JOB field. The request appears as shown below:

    Figure 21 Control-M Scheduling Definition Facility - Entry Panel

    Copy
      ----------- CONTROL-M SCHEDULING DEFINITION FACILITY - ENTRY PANEL ---------(2)
    COMMAND ===>
       
       
       
       SPECIFY LIBRARY, TABLE, JOB
       
          LIBRARY ===> CTM.TEST.SCHEDULE
          TABLE   ===> IDGS1               (Blank for table selection list)
          JOB     ===> IDJOB3              (Blank for job selection list)
       
          SMART TABLE         ===> (Y - for new SMART Table)

       
       
       
       SHOW JOB DOCUMENTATION   ===> N     (Y/N)
       AUTO-SAVE DOCUMENTATION  ===> N     (Y/N)
       
       
       
      USE THE COMMAND SHPF TO SEE PFK ASSIGNMENT                             23.00.04

    The Job Scheduling Definition screen for IDJOB3 is displayed.

    Figure 22 Job Scheduling Definition Screen

    Copy
      JOB: IDJOB3   LIB CTM.TEST.SCHEDULE                             TABLE: IDGS1
      COMMAND ===>                                                    SCROLL===> CRSR
      +-----------------------------------------------------------------------------+
        MEMNAME IDJOB3      MEMLIB  
        OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N
        APPL                                GROUP
        DESC   
        OVERLIB                                                   STAT CAL
        SCHENV                         SYSTEM ID                  NJE NODE
        SET VAR
        CTB STEP AT         NAME            TYPE
        DOCMEM  IDJOB3      DOCLIB  
        ===========================================================================
        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                      RETRO N MAXWAIT 00   D-CAT
        MINIMUM          PDS
        DEFINITION ACTIVE FROM          UNTIL                     
        ===========================================================================
        RESOURCE
       COMMANDS: EDIT, DOC, PLAN, JOBSTAT                                    11.17.00

In Introduction to Control-M, you learned that the job scheduling definition is partitioned into sections, each section separated from the preceding section by a line of equal signs.

To familiarize yourself with several more fields in these sections, you will fill in the job scheduling definition for IDJOB3. To do this, you must first outline the type of processing you expect for IDJOB3, which requires that you assume the following:

  1. IDJOB3 is an application that tabulates certain fiscal results once a month.

  2. IDJOB3 should always be scheduled on the last Friday of the month.

  3. IDJOB3 should be submitted only if the previous execution of the job (during the previous month) ended OK.

  4. IDJOB3 should be submitted only if the following resources are available:

    • 1 tape drive

    • 5 units of a CPU resource called IDCPOWER:

  5. IDJOB3 should be submitted from sometime between the hours of 11:00 p.m. on Friday night and 4:00 a.m. on Saturday Morning.

  6. IDJOB3 should be considered a critical path job with a priority of 5.

  7. IDJOB3 should be automatically submitted, no requirement for manual confirmation.

  8. If IDJOB3 ends OK, the appropriate reports are generated by the application.

  9. If the budget for IDJOB3, as defined in the application, was exceeded, the job returns a condition code of C0008 or above, depending on the amount by which the budget was exceeded, and the job should end NOTOK.

  10. If IDJOB3 ends OK, a prerequisite condition should be created indicating that it ended OK and the corresponding condition from the previous month’s run should be deleted.

  11. If IDJOB3 ends NOTOK, that is, if it has a condition code of C0008 or higher, the following should occur:

    • A condition should be created stating that the job ended NOTOK.

    • An appropriate message should be sent, or shouted, to user OPER1.

    • An auxiliary job, called IDJOB4, should be run to perform additional processing.

You can now fill in the job scheduling definition of IDJOB3.

Fields are described only briefly in the following sections, and that not all fields are discussed. Detailed descriptions for all fields of the Job Scheduling Definition screen are discussed in the Control-M for z/OS User Guide.

General Parameters Section

The fields in the first section of the Job Scheduling Definition screen correspond to the Job Scheduling Definition General parameters.

Copy
  +-----------------------------------------------------------------------------+
    MEMNAME IDJOB3      MEMLIB  
    OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N
    APPL                                GROUP
    DESC   
    OVERLIB                                                   STAT CAL
    SCHENV                         SYSTEM ID                  NJE NODE   
    SET VAR
    CTB STEP AT         NAME            TYPE
    DOCMEM  IDJOB1      DOCLIB  
    ===========================================================================

The General parameters, some of which you have seen earlier, provide basic information about the job, and are shown in the following table.

Table 4 Job Scheduling Definition Screen General Parameters

Parameters

Type of Information

MEMNAME, MEMLIB

Location of the JCL

OWNER

Owner of the job

TASKTYPE

Type of job

DESC

Job description

APPL, GROUP

Application and group to which the job belongs

DOCMEM, DOCLIB

Location of documentation about the job

  1. Specify the name of your test JCL library in the MEMLIB field

  2. Specify IDGRP2 in the GROUP field.

  3. Specify  FISCAL RESULTS ON LAST FRIDAY OF MONTH in the DESC field. The section looks as follows:

    Copy
      +-----------------------------------------------------------------------------+
        MEMNAME IDJOB3      MEMLIB   CTM.TEST.JCL
        OWNER   ID          TASKTYPE JOB    PREVENT-NCT2   DFLT  N
        APPL                                GROUP IDGRP2
        DESC    FISCAL RESULTS ON LAST FRIDAY OF MONTH
        OVERLIB                                                   STAT CAL
        SCHENV                         SYSTEM ID                  NJE NODE   
        SET VAR
        CTB STEP AT         NAME            TYPE
        DOCMEM  IDJOB3      DOCLIB  
        ===========================================================================

Basis Scheduling Parameters Section

The fields in the second section of the Job Scheduling Definition screen correspond to the Job Scheduling Definition Basic parameters.

Copy
    ===========================================================================
    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                      RETRO N MAXWAIT 00  D-CAT
    MINIMUM          PDS
    DEFINITION ACTIVE FROM          UNTIL                     
    ===========================================================================

These basic scheduling parameters determine on what day the job is scheduled, specifically, on what days the job becomes a candidate for execution. Scheduling days can be expressed in many ways, according to need. Several of the basic scheduling parameters are explained in the following table:

Table 5 Basic Job Scheduling Definition Parameters

Parameter

Explanation

DAYS

Days within the specified months on which to schedule the job. For more information, see MONTHS in this table.

Values can be expressed in various formats, the simplest of which is "straight values." For example, values 01 and 15 would mean the first and fifteenth day of the month, respectively.

Value ALL means all days of the month.

WDAYS

Days of the week within the specified months on which to schedule the job. For more information, see MONTHS in this table.

Values can be expressed in various formats.

Scheduling is relative to the day of the week that is defined as the start of the week at your site. For example, if Monday is defined as the start, or first day of the week at your site, a value of 1 means that the job is scheduled on Mondays, and 4 means that the job is scheduled on Thursdays.

AND/OR

Conjunctional parameter that determines the relationship between the DAYS and WDAYS parameters. An A (And) value requires that both sets of criteria be satisfied. An O (Or) value means that the criteria are satisfied if the DAYS criteria and/or the WDAYS criteria are satisfied.

MONTHS

Months in which to schedule the job.

All twelve months are listed as 01 through 12. A Y (Yes) or N (No) value can be specified for each month.

For months in which a job should be scheduled, that is, months with a Y value, the job is scheduled on those days determined by the DAYS and/or WDAYS values.

DATES

Specific dates on which to schedule the job. Format is mmdd or ddmm, depending on the site standard. For example, a DATES value of 0505 schedules the job on the 5th of May.

Several examples of how these parameters might be used are shown below.

  • To schedule a job on the 1st and 15th of every month

    Copy
        ===========================================================================
        DAYS    01,15                                                 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                      RETRO N MAXWAIT 00  D-CAT
        MINIMUM          PDS
        DEFINITION ACTIVE FROM          UNTIL                     
        ===========================================================================
  • To schedule a quarterly job on 31 March, 30 June, 30 September and 31 December (assuming a date format of mmdd)

    Copy
        ===========================================================================
        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   0331 0630 0930 1231
        CONFCAL                      RETRO N MAXWAIT 00  D-CAT
        MINIMUM          PDS
        DEFINITION ACTIVE FROM          UNTIL                     
        ===========================================================================
  • To schedule a job on every Wednesday in June (assuming start of week is Monday)

    Copy
        ===========================================================================
        DAYS                                                          DCAL
                                                                           AND/OR
        WDAYS   3                                                     WCAL
        MONTHS  1- N 2- N 3- N 4- N 5- N 6- Y 7- N 8- N 9- N 10- N 11- N 12- N
        DATES 
        CONFCAL                      RETRO N MAXWAIT 00  D-CAT
        MINIMUM          PDS
        DEFINITION ACTIVE FROM          UNTIL                     
        ===========================================================================

In your job scheduling definition, you want to schedule the job on the last Friday of the month. For this you need to know that in the DAYS parameter, a value of L1 means the last day of the month, L2 is the second to the last day of the month, and so on.

  1. In the DAYS field, specify the following values: L1,L2,L3,L4,L5,L6,L7. Be sure to separate values by a comma, and leave no embedded spaces.

  2. In the AND/OR field, specify A (And).

  3. In the WDAYS field, specify 5.

    This example assumes your site-defined start of week is Monday. If the start of week is defined as Sunday, use a WDAYS value of 6 instead of 5. If you do not know the site-defined start of week, it does not really matter which value you use in this exercise.
    But to use this parameter successfully in your real job scheduling definitions, you need to know, and should find out from your INCONTROL administrator, your site-defined start of week.

  4. Make no changes to the MONTHS values, because they are correctly set to Y (Yes) for all months.

    This section of your screen appears as shown below:

    Copy
    ===========================================================================
        DAYS    L1,L2,L3,L4,L5,L6,L7                                  DCAL
                                                                           AND/OR A
        WDAYS   5                                                     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                      RETRO N MAXWAIT 00  D-CAT
        MINIMUM          PDS
        DEFINITION ACTIVE FROM          UNTIL                     
        ===========================================================================

Remember the following points:

  • The values of the DAYS parameter limits the scheduling to the last week of the month.

  • The value of the WDAYS parameter limits the scheduling to Fridays.

  • The A (And) value in the AND/OR field requires that both sets of criteria be satisfied. This limits the scheduling to the last Friday in the last week of the month.

  • The Y (Yes) value for all months ensures that the scheduling on the last Friday of the month will occur every month.

Runtime Scheduling Parameters Section

The fields in the third section of the Job Scheduling Definition screen correspond to the Job Scheduling Definition Runtime Scheduling parameters.

Copy
    ===========================================================================
    IN      
    CONTROL
    RESOURCE
    PIPE    
    FROM TIME         +     DAYS    UNTIL TIME      +     DAYS  
    DUE OUT TIME      +     DAYS    PRIORITY     SAC    CONFIRM 
    TIME ZONE:                                                  
  ===========================================================================

The PIPE parameter is only displayed if MAINVIEW Batch Optimizer (MVBO) is installed at your site.

The Runtime Scheduling parameters define runtime criteria that must be satisfied before the job can be submitted. You have already seen the IN parameter and CONFIRM parameters. Table 6 explains several of the Runtime Scheduling parameters.

Table 6 Runtime Scheduling Parameters

Parameter

Explanation

CONTROL

Control Resource. Each Control resource specification consists of two values: Resource name and the type of control required. Valid values for the type of control are:

  • E – Exclusive

  • S – Shared

For example, this parameter can be used to specify that exclusive control of a particular file is required. Control-M does not submit the job until it has exclusive control of that file.

RESOURCE

Quantitative Resource. Each Quantitative resource specification consists of two values: Resource name and the quantity required.

For example, this parameter can be used to specify that two tape drives are required by the job. Control-M does not submit that job until two tape drives are available and reserved for that job.

TIME
    FROM
     UNTIL

TIME FROM indicates the earliest time that Control-M can submit the job. If specified, the job is not submitted before this time of the scheduling day.

TIME UNTIL indicates the latest time by which a job can be submitted. If Control-M is unable to submit the job before this time (for example, if a required resource is not available before the UNTIL time), the job is not submitted.

Either value or both, or neither, can be specified. No value means that a time factor is irrelevant for job submission.

It is possible to specify the FROM/TO offset in days in addition to the FROM/TO time. For details, see the Control-M for z/OS User Guide.

 

PRIORITY

Job priority. If two or more jobs awaiting submission are competing for resources, this value enables Control-M to determine which job to submit, based on priority.

Alphabetic or numeric values can be specified, where
A < Z < 1 < 9.

Critical path priority can be indicated by specifying an asterisk (*) before the priority value (for example, *5). A critical path job always takes precedence over a non-critical path job.

You had previously determined the following submission criteria for the job:

  • The job can be submitted only if the previous month’s execution of the job ended OK.

  • The job requires the following resources:

    • 1 tape drive

    • 5 units of CPU

  • The job must be submitted between the hours of 11:00 p.m. (Friday)  and 4:00 a.m. (Saturday).

  • The job is a critical path job with a priority of 5.

  • The job must be submitted automatically without manual confirmation.

Define the criteria as follows:

  1. In the IN fields, specify IDJOB3-ENDED-OK as the condition name.

  2. Press Tab after specifying the condition name, to place the cursor in the DATE field.

  3. Specify PREV as the value for the DATE field.

    When you define post-processing parameters, you will see that when the job ends OK this same IN condition is added, but with a date of ODAT.

  4. In the RESOURCE field, specify IDTAPE-DRIVE as the resource name.

  5. Press Tab after specifying the resource name to place the cursor in the QUANTITY field.

  6. Specify 1 as the value for the QUANTITY field.

    Two resources can be specified on a single line. Once you specify the quantity of the first resource, the cursor automatically tabs over to the RESOURCE-NAME field for the second resource.

  7. Specify IDCPOWER as the second resource name, and 5 as the quantity.

    Once you have filled in two resources on the resource line, an additional resource line is opened to enable you to specify more resources.

  8. In the TIME FROM field, specify 2300. In the UNTIL field specify 0400.

  9. In the PRIORITY field, specify *5.

  10. In the CONFIRM field, which you defined in the previous exercise, delete the Y value.

    This section of the job scheduling definition appears as shown below:

    Copy
      ===========================================================================
      IN       IDJOB3-ENDED-OK      PREV                                         
      CONTROL                                             
      RESOURCE IDTAPE-DRIVE         0001      IDCPOWER             0005          
      PIPE                                                                       
      FROM TIME 2300    +     DAYS    UNTIL TIME 0400 +     DAYS  
      DUE OUT TIME      +     DAYS    PRIORITY *5    SAC    CONFIRM 
      TIME ZONE:                                                  
      ===========================================================================

Post-Processing Parameters Section

The fields in the fourth section of the Job Scheduling Definition screen correspond to the Job Scheduling Definition Post-Processing parameters.

Copy
    ===========================================================================
    OUT     
    AUTO-ARCHIVE            SYSDB           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 <<<<<<<<<<<<<<<< =====

These Post-Processing parameters define actions to be performed by Control-M after the job ends. Basically, these can be divided into three main groups—those relevant if the job ends OK, those relevant under specified circumstances, and those that are always relevant.

The OUT parameter has already been discussed, and those discussions are relevant only if the job ends OK. Table 7 explains several other Post-Processing parameters.

Table 7 Post-Processing Parameters ON and DO Statements

Parameter

Explanation

ON

The ON statement constitutes the beginning of an ON/DO conditional block that is relevant only in the specified situation. The ON block defines a set of circumstances. If those circumstances are met, the specified DO actions are performed.

ON criteria have two parts: steps and codes.

When defining the ON block, you specify a step or set of steps (program and/or procedure steps), and possible results for those steps (condition codes, abend codes, system codes and so on).

If this combination of steps and codes is satisfied, the DO block is performed.

A complex set of values, including predefined keyword values such as ANYSTEP, can be specified in the ON block.

If more than one ON statement is specified in the block, the A/O (And/Or) field determines the relationship between them. Valid values are A (And) and O (Or).

DO

DO statements specify actions to be performed if the ON criteria are satisfied. Many different DO statements are available. For example:

DO COND adds or deletes a prerequisite condition.

DO FORCEJOB forces a job to be scheduled.

DO SHOUT sends, or shouts, a message to a specified destination.

DO RERUN reruns the job.

When you type the name or abbreviation of the DO statement, such as COND, or SHOUT, in the DO field, the appropriate subparameter fields for the statement are displayed.

If by mistake you request the wrong DO statement, you can delete it by selecting the DO statement name, such as COND, and pressing Enter.

This section contains a SHOUT WHEN statement. This statement, which is not examined in this chapter, is different than the DO SHOUT statement.

You had previously decided to request the following post-processing activities:

  • If the job ends OK, which is a condition code of less than C0008

    • the prerequisite condition of the successful run from the previous month, should be deleted

    • a new prerequisite condition indicating that the job ended OK should be created.

  • If the job ends NOTOK, that is, it has a condition code of C0008 or higher

    • a condition must be created to indicate that the job ended NOTOK.

    • an appropriate message must be shouted to your userID.

    • auxiliary job IDJOB4 must be run to perform additional processing.

You can now define the necessary values.

  1. Fill in the OUT fields with the following value:

    IDJOB3-ENDED-OK  ODAT +

    After filling in the second condition, a new, blank OUT condition line is opened to enable you to specify another condition.

  2. In the ON block, specify ANYSTEP in the PGMST (program step) field, and specify the value >C0007 in the CODES field. A value equal to or greater than C0008 is synonymous with a value greater than C0007.

  3. In the DO field, type COND and press Enter.

    The DO COND statement is opened, as is a blank DO statement for specification of another DO statement.

  4. Fill in the DO COND fields with the following values:

    IDJOB3-END-NOTOK   ODAT +

  5. In the blank DO field, type SHOUT and press Enter.

    The DO SHOUT statement is opened, as is a blank DO statement for specification of another DO statement, as shown below.

    Copy
         DO SHOUT     TO                     URGENCY
      = 
    DO
  6. In the DO SHOUT statement, specify your userID in the TO subparameter field; replace the R (Regular) with U (Urgent) in the URGENCY field; and specify the message FRIDAY FISCAL RESULTS RUN FAILED following the equal sign (=).

    Note that the only urgency value, other than R and U,  is V, which signifies a Very Urgent message.

  7. In the blank DO field, type FORCEJOB and press Enter.

    The DO FORCEJOB statement is opened, as is a blank DO statement for specification of another DO statement, as shown below.

    Copy
         DO FORCEJOB  TABLE                  JOB                       DATE
    LIBRARY
    DO
  8. In the DO FORCEJOB statement, specify the current table name (IDGS1)in the TABLE field; specify IDJOB4 in the JOB field; specify ODAT in the DATE field; and specify the current scheduling library name in the LIBRARY field.

    Copy
    ===========================================================================
      OUT      IDJOB3-ENDED-OK      ODAT +                                        
                                                                                 
      AUTO-ARCHIVE            SYSDB           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 ANYSTEP  PROCST          CODES >C0007                          A/O
        DO COND          IDJOB3-END-NOTOK     ODAT +                              
        DO SHOUT     TO  ID                 URGENCY U                            
         = FRIDAY FISCAL RESULTS RUN FAILED                            
        DO FORCEJOB  TABLE   IDGS1          JOB   IDJOB4              DATE ODAT   
                     LIBRARY CTM.TEST.SCHEDULE                                   
        DO                                                                        
      ON PGMST          PROCST          CODES                               A/O   
        DO                                                                        

    This section of the job scheduling definition appears as shown below:

    You have now finished defining IDJOB3.

  9. Exit the job scheduling definition of IDJOB3.

    The Job List screen is displayed. This is where you can take a closer look at the use of IN, OUT, and DO COND conditions, and their date qualifiers, to create job dependencies.

Conditions, Date Qualifiers, and Job Dependencies

Conditions are generally used to create job dependencies. In the previous chapter you saw that when IDJOB1 ended OK, it set an OUT condition (IDJOB1-ENDED-OK) that satisfied the prerequisite IN condition to IDJOB2. This is necessary because IDJOB2 could not be submitted until IDJOB1 ended OK.

Earlier in this chapter you defined a DO COND condition. Both OUT and DO COND are post-processing statements that add or delete conditions. But the OUT condition is only added or deleted when the job ends OK; the DO COND condition is only added or deleted when the criteria in the ON block are satisfied.

As mentioned in the last chapter, every condition has an associated date. This can be an explicitly defined date, such as 0909, but more commonly, it is a keyword that represents an actual date. For example, the date keyword ODAT stands for the original scheduling date of the job. The meaning of original scheduling date is discussed in AutoEdit and JCL, and is referred to in the discussion of date concepts in the Control-M for z/OS User Guide.

A condition is actually identified by the combination of its name and date. Two conditions having the same name but different dates are considered two different conditions. In the last chapter, you wanted the run of IDJOB2 to be dependent on the run of IDJOB1 from the same day. Therefore, not only did the condition names of both jobs have to match, but so did the dates. Use of the keyword ODAT for both the IN and the OUT condition ensured that they match. Had they run on different original scheduling dates, there would have been no match.

In this chapter you create another type of dependency—a dependency between different runs of the same job on different dates. IDJOB3 cannot run this month unless it successfully ran last month. The same condition name is used (IDJOB3-ENDED-OK), but with different dates for the IN condition and OUT condition.

  • The date of the OUT condition is the date of the current job run; in other words, ODAT.

  • The IN condition can only be satisfied by the run from the previous month. Therefore, the date of the OUT condition is PREV, a keyword that resolves to the previous original scheduling date (that is, the last run) of the job.

Displaying the Scheduling Plan for the Job

Before beginning to define IDJOB4, display the schedule plan for IDJOB3.

Option P (PLN) in the Job List screen is used to request a graphic display of a schedule for job planning.

Figure 23 Option P (PLN)

Copy
 JOB LIST     LIB: CTM.TEST.SCHEDULE                             TABLE: IDGS1 
 COMMAND ===>                                                    SCROLL===> CRSR
 OPT  NAME ----- DESCRIPTION ---------------------------------------------------
      IDJOB1     THIS JOB MUST BE RUN BEFORE JOB2
      IDJOB2
      IDJOB3     FISCAL RESULTS ON LAST FRIDAY OF MONTH
  ====== >>>>>>>>>>>>>>>>    NO MORE JOBS IN TABLE     <<<<<<<<<<<<<<<<<<< =====
                                     
                                     
                                     
  
  
  
  
  
  
  
  
  
  
  
  
  
OPTIONS S SEL D DEL I INS O ORDER F FORCE J JCL C COPY P PLN T JOBSTAT 15.37.39
  1. Enter option P for IDJOB3. A window containing FROM DATE and TO DATE fields opens. This window enables you to specify the time period for which the scheduling plan should be displayed.

    Figure 24 Job Scheduling Plan Window

    Copy
    JOB LIST     LIB: CTM.TEST.SCHEDULE                             TABLE: IDGS1  
    COMMAND ===>                                                    SCROLL===> CRSR
    OPT  NAME -------- DESCRIPTION ------------------------------------------------
         IDJOB1       +---------------------+ FORE JOB JOB2                       
         IDJOB2       |  FROM DATE  020201  |                                     
     P   IDJOB3       |  TO DATE    040301  | FRIDAY OF MONTH                     
     ====== >>>>>     +---------------------+ S IN TABLE     <<<<<<<<<<<<<<<< =====
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    OPTIONS S SEL D DEL I INS O ORDER F FORCE J JCL C COPY P PLN T JOBSTAT 11.16.50

    The default FROM DATE value is the current working date. The default TO DATE value is one month, or thirty days, following the current working date.

  2. Set the FROM DATE to the first day of the current month. Set the TO DATE to the last day of the current month, and press Enter.

    The Job Scheduling screen is displayed.

    Figure 25 Job Scheduling Screen

    Copy
    JOB NAME: IDJOB3                 JOB SCHEDULING         DATES : 010201 - 280201
    COMMAND ===>                                                    SCROLL===> CRSR
                                                                                  
       02   2001        MON   TUE   WED   THU   FRI   SAT   SUN                   
                                          01    02    03    04                    
                                                                                  
                                                                                  
                        05    06    07    08    09    10    11                    
                                                                                  
                                                                                  
                        12    13    14    15    16    17    18                    
                                                                                  
                                                                                  
                        19    20    21    22    23    24    25                    
                                                 *                                
                                                                                  
                        26    27    28                                            
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    CMDS: NEXT, PREV, END                                                  11.32.19

    The Job Scheduling screen displays a calendar in graphic format. The dates within the specified date range on which the job is to be scheduled are marked with an asterisk.

    If the specified date range spans multiple months, a different calendar panel is displayed for each month, beginning with the first month. You can move between panels by pressing relevant PF keys. PF keys and their associated commands are explained in the following table.

    Table 8 PF Keys and Screen Navigation Commands for Job Scheduling Plan Screens

    PF Keys

    Associated Commands

    PF07/PF19

    UP (scroll backward)

    PF08/PF20

    DOWN (scroll forward)

    PF10/PF22

    PREV (where applicable)

    PF11/PF23

    NEXT (where applicable)

    Months in the date range in which the job is not scheduled are not displayed.

    You can also display the Job Scheduling screen from the Job Scheduling Definition screen. To do so, enter PLAN in COMMAND field. This is especially useful for checking your definition of a complex schedule while you are working on it.

  3. Exit the Job Scheduling screen to display the Job List screen.

Defining JOB4

Save the definition of IDJOB3 and create IDJOB4, as explained in the following steps.

  1. Exit the Job List screen.

    The Exit option window is displayed.

    Because you are saving the job scheduling definition in a table that already exists (IDGS1), you should use the SAVE option, not the CREATE option.

  2. Specify Y in the SAVE field and leave the CREATE field blank.

    The job scheduling definition is saved in the table. Because you bypassed the Table List screen when you entered the job scheduling definition, the entry panel is displayed.

    You can now create JOB4 by specifying a new JOB name in the entry panel,  as was done when you created IDJOB1 and IDJOB3, or by performing an Insert procedure in the Job List screen, as was done when you created IDJOB2.

    Because JOB4 will be very similar to JOB2, you should use the Insert method. Before going to the Job List screen, however, you should first enter the Table List screen and select the table you want to use as a template for the new job.

  3. Ensure the TABLE and JOB name fields are blank in the Entry panel, and enter the correct library name.

    The Table List screen is displayed.

  4. Enter the SELECT option for table IDGS1.

    The Job List screen is displayed for table IDGS1. It lists jobs IDJOB1, IDJOB2, and IDJOB3.

  5. Enter the INSERT option for IDJOB2.

    A new job scheduling definition is displayed. It contains several values found in IDJOB2.

  6. Make the following changes in the job scheduling definition.

    1. Specify IDJOB4 in the MEMNAME field.

    2. Change the value of the GROUP field to IDGRP2.

    3. Add the following description in the DESC field:
      AUXILIARY JOB WHEN IDJOB3 ENDS NOTOK.

    4. Delete the ALL value from the DAYS parameter.

    5. Replace the existing IN condition with IDJOB3-END-NOTOK, but do not change the date value ODAT.

    6. Change the OUT condition to IDJOB4-ENDED-OK  ODAT +.

The job scheduling definition appears as follows:

Figure 26 Job Scheduling Definition for job IDJOB4

Copy
  JOB: IDJOB4   LIB CTM.TEST.SCHEDULE                             TABLE: IDGS1 
  COMMAND ===>                                                    SCROLL===> CRSR
  +-----------------------------------------------------------------------------+
    MEMNAME IDJOB4      MEMLIB   CTM.TEST.JCL
    OWNER   ID          TASKTYPE JOB    PREVENT-NCT2 Y DFLT  N
    APPL                                GROUP IDGRP2
    DESC    AUXILIARY JOB WHEN IDJOB3 ENDS NOTOK
    OVERLIB                                                   STAT CAL
    SCHENV                         SYSTEM ID                  NJE NODE    
    SET VAR
    CTB STEP AT         NAME            TYPE
    DOCMEM  IDJOB4      DOCLIB  
    ===========================================================================
    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                      RETRO N MAXWAIT 00  D-CAT
    MINIMUM          PDS
    DEFINITION ACTIVE FROM          UNTIL                     
    ===========================================================================
    IN       IDJOB3-END-NOTOK     ODAT
    CONTROL
    RESOURCE
    PIPE    
    FROM TIME         +     DAYS    UNTIL TIME      +     DAYS  
    DUE OUT TIME      +     DAYS    PRIORITY 00  SAC    CONFIRM 
    TIME ZONE:                                                  
    ===========================================================================
    OUT      IDJOB4-ENDED-OK      ODAT +
    AUTO-ARCHIVE            SYSDB           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                                    11.17.00

You can save the job using the following procedure:

  1. Exit the job scheduling definition.

    The Job List screen is displayed.

  2. Exit the Job List screen.

    The Exit option window is displayed.

  3. Specify Y in the SAVE field and leave the CREATE field blank.

    This time, because you entered the Table List screen on the way to the job scheduling definition, the Table List screen is displayed.

  4. Enter the SELECT option for table IDGS1.

    Shown below is that section of the Job List screen for table IDGS1 that lists jobs IDJOB1, IDJOB2, IDJOB4 and IDJOB3.

Figure 27 Job List Screen

Copy
 JOB LIST     LIB: CTM.TEST.SCHEDULE                             TABLE: IDGS1 
 COMMAND ===>                                                    SCROLL===> CRSR
 OPT  NAME ----- DESCRIPTION ---------------------------------------------------
      IDJOB1     THIS JOB MUST BE RUN BEFORE IDJOB2
      IDJOB2
      IDJOB4     AUXILIARY JOB WHEN IDJOB3 ENDS NOTOK
      IDJOB3     FISCAL RESULTS ON LAST FRIDAY OF MONTH

Job Ordering and Job Forcing

In the previous chapter, you ordered IDJOB1 and IDJOB2 by requesting the O (Order) option for those jobs in the Job List screen. The requested job orders were placed in the active environment, and you saw those job orders listed in the Active Environment screen.

An ordered job is placed in the active environment only if its Basic scheduling criteria are satisfied when the job is ordered, that is, only if the job should otherwise be ordered for that day. This was the case when you ordered IDJOB1 and IDJOB2, because both jobs had a DAYS value of ALL and a Y (Yes) value for every month, which means that the Basic scheduling criteria of the job are satisfied every single day of the year.

In this last exercise, you made IDJOB3 eligible for ordering on the last Friday of each month. If you try to order the job on any other day, it will not be placed in the active environment. There is an option, however, that enables you to force the job into the active environment even when its Basic Scheduling criteria are not satisfied. This is the F (Force) option that is shown at the bottom of the Job List screen.

The following procedure explains how to force the scheduling of IDJOB3. You should be aware that you do not force IDJOB4, because IDJOB4 is a conditional job that is forced by a DO FORCEJOB statement when job IDJOB3 fails with a condition code of C0008 or above.

  1. Enter option F (Force) for IDJOB3, as shown in Job List Screen.

  2. If a Confirmation window is displayed, confirm the forcing of the job.

    The Message window now displays a confirmation of the job forcing.

  3. Exit the Message window.

    The Job List screen is again displayed.

    You can now display the Active Environment screen and see the results of the forced scheduling of IDJOB3.

  4. Enter =3 in the COMMAND field of the Job List screen.

    The Active Environment screen is displayed. IDJOB3 is in Wait Schedule status. This means that the Runtime Scheduling criteria of the job are not satisfied.

  5. Ensure that filter IDGS is displayed. If it does not appear in the Filter field, enter SHOW IDGS in the COMMAND field.

  6. If the Option line is not displayed at the bottom of the screen, enter OPT in the COMMAND field to display the options.

Through a combination of screens, you can determine why the job is in a Wait Schedule status and correct the problems so that the job is submitted. Some of those screens are displayed and explained in the following sections.

Job List Screen

Figure 28 Job List Screen

Copy
Filter: IDGS      ------- Control-M  Active  Environment ------ UP    <D> - (3)
COMMAND ===>                                                    SCROLL ==> CRSR
O Name     Owner    Odate  Jobname  JobID   Typ ----------- Status ------------
  IDJOB3   ID       020201                  JOB Wait Schedule               
========= >>>>>>>>>>>>>        Bottom of Jobs List       <<<<<<<<<<<<< ========
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 Opt: ? Why L Log H Hold Z Zoom R Rerun A Activate O Force OK V View Sysout    
      N Net D Del F Free S Stat G Group U Undelete J JCL Edit C Confirm 20.59.34

Why Screen

To see why the job did not run, request the ? (Why) screen. This screen can be accessed from the Active Environment screen by requesting the ? option for the job. The ? option is the first option listed in the option information line at the bottom of the screen.

  1. Enter option ? (Why) for IDJOB3.

The Why screen is displayed for IDJOB3. As the title line of the screen indicates, this screen provides a scheduling analysis for the job.

Figure 29 Why Screen

Copy
------------------------ IDJOB3   SCHEDULING ANALYSIS --------------------(3.?)
COMMAND ===>                                                    SCROLL===> CRSR
OPT DESCRIPTION                                                               
                                                                              
    TIME LIMIT        FROM   2300            UNTIL    0400                    
    RESOURCE         IDTAPE-DRIVE            QUANTITY 0001                    
    RESOURCE         IDCPOWER                QUANTITY 0005                    
    CONDITION  IDJOB3-ENDED-OK                          ODATE  0202           
 ====== >>>>>>>>>>>>>>>>>>>>>   END OF "WHY" LIST   <<<<<<<<<<<<<<<<<<<<< =====
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
OPTION:  A ADD CONDITION                                               15.48.23

Why the Job Did Not Run

The screen identifies several scheduling problems:

  • There is a TIME LIMIT problem—the job must be submitted between 11:00 p.m. and 4:00 a.m. This problem does not appear in the Why screen if you happen to be working on this guide during those hours.

    Your site-defined start of workday, that is, the time of New Day Processing, can impact how the TIME FROM and UNTIL range determines when the job should be submitted. For more information, see the discussion of date definition concepts in Introduction to Control-M, and the description of the TIME parameter in the Control-M for z/OS User Guide.

  • The two missing RESOURCES (IDTAPE-DRIVE and IDCPOWER) and their required quantities are listed. These quantities are not listed if by chance you actually have resources with these names in use and allotted at your site.

  • Finally, the missing IN CONDITION (IDJOB3-ENDED-OK) is listed, unless you have an actual job that added this condition.

The problems listed above are the runtime scheduling requirements that prevent your job from running.

Runtime scheduling requirements are defined for a purpose, and it is generally not desirable to nullify them or work around them. However, sometimes it does become desirable to manually intervene to enable job submission, and Control-M allows for such intervention. The following sections illustrate how you can correct the problems and enable the job run.

Adding a Missing Condition in the Why Screen

Begin by adding the missing condition. You can do this in the Why screen. Notice the A (ADD CONDITION) option listed at the bottom of the Why screen.

  1. Tab to the CONDITION line and request option A.

    A confirm window is displayed.

  2. Confirm the request.

    Figure 30 Confirmation Window for Adding Condition in Why Screen

    Copy
    ------------------------ IDJOB3   SCHEDULING ANALYSIS --------------------(3.?)
    COMMAND ===>                                                    SCROLL===> CRSR
    OPT DESCRIPTION                                                               
                                                                                    
        TIME LIMIT        FROM   2300            UNTIL    0400                    
        RESOURCE         IDTAPE-DRIVE            QUANTITY 0001                    
        RESOURCE         IDCPOWER                       +-------------------------+
     A  CONDITION  IDJOB3-ENDED-OK             <--------|  CONFIRM Y   DDMM 0202  |
     ====== >>>>>>>>>>>>>>>>>>>>>   END OF "WH          +-------------------------+
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
                                                                                  
    OPTION:  A ADD CONDITION                                               14.45.44

The condition disappears from the Why screen, and a message appears at the top of the screen stating that the condition has been added.

IOA Conditions/Resources Screen

As already mentioned, two quantitative resources,  IDTAPEDRIVE (1 unit) and IDCPOWER (5 units), are missing. You can add these missing conditions in the IOA Conditions/Resources screen.

  1. Enter =4 in the COMMAND field of the Why screen.

    The IOA Conditions/Resources screen is displayed.

    Figure 31 IOA Conditions/Resources Screen

    Copy
     -------------------------- IOA CONDITIONS/RESOURCES ------------------------(4)
     COMMAND ===>                                                   SCROLL ===> CRSR
     PREFIX  ===>                COND Y CONTROL Y RES Y STAT Y      DATE 0202 - 0202
     OPT TYPE      CONDITION/RESOURCE    IOAID  USE QUANTITY  MAX  *P   RBA    DATE 
         CONTROL   CONTROLM               01     E                    (00000)   
         RESOURCE  TAPEP                              0003   0003
         RESOURCE  CPU1                               0098   0100
         RESOURCE  CPU2                               0197   0200
         RESOURCE  TAPEP                  01     Q    0002            (00091)
         RESOURCE  CPU1                   01     Q    0002            (00091)
         RESOURCE  CPU2                   01     Q    0003            (00092)
         RESOURCE  TAPEP                  01     R    0002          1 (00093)
         COND      BR-BRIVPCC-ENDED-OK                                         0202
         COND      BR-BRCC0001-ENDED-OK                                        0202
         COND      BR-BRCC0002-ENDED-OK                                        0202
         COND      BR-BRCC0003-ENDED-OK                                        0202
         COND      BR-BRCCIND-ENDED-OK                                         0202
         COND      BR-BRUPDT02-ENDED-OK                                        0202
         COND      BR-BRREP001-ENDED-OK                                        0202
         COND      BR-BRREP002-ENDED-OK                                        0202
         COND      GL-GLINP001-ENDED-OK                                        0202
         COND      EBD-APPL-STARTED                                            0202
         COND      CICS-PROD-IS-UP                                             STAT
     OPTIONS:  D DELETE  C CHANGE             COMMANDS: ADD                 14.07.08

The IOA Conditions/Resources screen displays the list of existing Control and Quantitative resources, which are stored in the Control-M Resources file, and the list of existing conditions stored in the IOA Conditions file.

Filtering the IOA Conditions/Resources Screen

When the list of conditions and resources in the IOA Conditions/Resources screen is very long, say ten or twenty or even fifty pages, it can be very useful to filter the display.

You can filter the display based on prefix and/or based on type of resource or condition. You can now filter the display so that only conditions and resources beginning with your ID are showing.

  1. Enter ID in the PREFIX field. Ensure that the COND, CONTROL and RES values  are set to  Y (Yes) to display conditions, Control resources and Quantitative resources.

    Only the condition you previously added in the Why screen should appear, unless there are other conditions and resources that are prefixed by your ID. The display appears as shown below:

    Copy
    -------------------------- IOA CONDITIONS/RESOURCES ------------------------(4)
    COMMAND ===>                                                   SCROLL ===> CRSR
    PREFIX  ===> ID             COND Y CONTROL Y RES Y STAT Y      DATE 0202 - 0202
    OPT TYPE      CONDITION/RESOURCE    IOAID  USE QUANTITY  MAX  *P   RBA    DATE
        COND      idJOB3-ENDED-OK                                             0202
    ======== >>>>>>>>>>>>>>>> B O T T O M   O F   L I S T <<<<<<<<<<<<<<<< ========

Adding a Condition or Resource

Using the ADD command listed at the bottom of the screen, you can now add the missing resources to the Control-M Resources file.

  1. Type ADD RESOURCE in the COMMAND field of the IOA Conditions/Resources screen.

    The Add Resources window is displayed.

  2. Enter IDTAPE-DRIVE in the NAME field and 0001 in the COUNT field, and press Enter.

    Figure 32 Add Resources Window in IOA Conditions/Resources Screen

    Copy
    -------------------------- IOA CONDITIONS/RESOURCES ------------------------(4)  
    COMMAN +---------------------------------------------------------+  L ===> CRSR
    PREFIX |  PLEASE FILL IN QUANT RES NAME, COUNT AND PRESS ENTER   |  0202 - 0202
    OPT TY |                                                         |  BA    DATE
        CO |  NAME ===> IDTAPE-DRIVE             COUNT ===>   0001   |        0202
    ====== |                                                         |  << ========
           +---------------------------------------------------------+            

    The window is closed and the resource is added to the Control-M Resources list in the specified quantity.

  3. Repeat the previous step, but specify IDCPOWER in the NAME field, and a  0005 in the COUNT field.

    The IOA Conditions/Resources screen now contains the required condition and the necessary quantities of the required resources.

    Copy
    -------------------------- IOA CONDITIONS/RESOURCES ------------------------(4)
    COMMAND ===>                                                   SCROLL ===> CRSR
    PREFIX  ===> ID             COND Y CONTROL Y RES Y STAT N      DATE 0202 - 0202
    OPT TYPE      CONDITION/RESOURCE    IOAID  USE QUANTITY  MAX  *P   RBA    DATE
        RESOURCE  IDCPOWER                      B    0005    0005                 
        RESOURCE  IDTAPE-DRIVE                  B    0001    0001                 
        COND      IDJOB3-ENDED-OK                                             0202
    ======== >>>>>>>>>>>>>>>> B O T T O M   O F   L I S T <<<<<<<<<<<<<<<< ========

The condition you added from the Why screen could have instead been added using the ADD command in the IOA Conditions/Resources screen. In this case, the command would have been ADD CONDITION instead of ADD RESOURCE.  A Control resource can be add using the command ADD CONTROL.

In accordance with the instruction line at the bottom of the screen, the IOA Conditions/Resources screen permits the deletion of resources and conditions.

A Second Look at the Why Screen

You can now return to the Why screen and see the results of your adding the missing condition and resources.

  1. Enter =3 in the COMMAND field of the IOA Conditions/Resources screen.

    The Why screen, which was your last displayed screen in the Tracking and Control facility, is displayed.

  2. Exit from the Why screen and return to it.

    Now that the required conditions and resources have been added, the Why screen shows the only remaining problematic runtime criteria: The TIME LIMIT problem.

    Copy
    ------------------------ IDJOB3   SCHEDULING ANALYSIS --------------------(3.?)
    COMMAND ===>                                                    SCROLL===> CRSR
    OPT DESCRIPTION                                                               
                                                                                  
        TIME LIMIT        FROM   2300            UNTIL    0400                    
     ====== >>>>>>>>>>>>>>>>>>>>>   END OF "WHY" LIST   <<<<<<<<<<<<<<<<<<<<< =====
                                                                                  

    You can correct this remaining problem in a screen called the Zoom screen, which is described in the following section.

Zoom Screen

The Zoom screen is very similar to the Job Scheduling Definition screen.  Instead of displaying the permanently defined job scheduling definition, however, the Zoom screen displays the job scheduling definition of the requested job order.

In the Zoom screen, you can change or delete TIME FROM and TIME UNTIL criteria for a job order. You can now display the Zoom screen, which is requested from the Active Environment screen.

  1. Exit the Why screen.

    The Active Environment screen is displayed.

    Note the Z (Zoom) option at the bottom of the Active Environment screen. This option displays the Zoom screen.

    You will recall from Chapter2, "Scheduling Definition and Manual Intervention," that before you could delete a job from the Active Environment screen, you had to place the job in Held status. To make changes through the Zoom screen, you must first hold the job in the Active Environment screen, and then enter the Zoom screen.

  2. Enter option H for IDJOB3. Press Enter several times until the status of the job is changed to Held Wait Schedule.

  3. Enter option Z for IDJOB3.

    The Zoom screen is displayed.

    Figure 33 Zoom Screen

    Copy
    ----------------------------- CONTROL-M ZOOM SCREEN ----------------------(3.Z)
    COMMAND ===>                                                    SCROLL===> CRSR
    +-----------------------------------------------------------------------------+
      MEMNAME IDJOB3      MEMLIB   CTM.TEST.JCL                                  
      OWNER   ID          TASKTYPE JOB              PREVENT-NCT2   DFLT- N       
      SCHDTAB IDGS1       SCHDLIB  CTM.TEST.SCHEDULE                             
      APPL                                          GROUP                        
      OVERLIB                                                   STAT CAL         
      SCHENV                         SYSTEM ID                  NJE NODE         
      JOBNAME           JOBID          ODATE 020201 ORDERID 001QO      MAXWAIT 05
      RESTART DECISION-FROM          .          TO          .          CONFIRM N 
      DESC    FISCAL RESULTS ON LAST FRIDAY OF MONTH                             
      SET VAR                                                                    
      CTB STEP AT         NAME            TYPE                                   
      DOCMEM  IDJOB3      DOCLIB                                                 
      ===========================================================================
      IN           IDJOB3-ENDED-OK      0202                                     
      CONTROL                                                                    
      RESOURCE IDTAPE-DRIVE         0001      IDCPOWER             0005          
      PIPE                                                                       
      FROM TIME 2300    +     DAYS    UNTIL TIME 0400 +     DAYS  
      DUE OUT TIME 1159 +     DAYS    PRIORITY *5  SAC    CONFIRM N
      TIME ZONE:                                                  
    COMMANDS:  SAVE  DOC  NOTE                                           12.54.56

There are differences between the permanent definition displayed in the Job Scheduling Definition screen, and the job order definition displayed in the Zoom screen. For example, the definition in the Zoom screen does not display Basic scheduling parameters—these parameters are irrelevant once the job order is in the Active Environment. And the Zoom screen displays parameters such as SEARCH COUNTER, which are not found in the job scheduling definition, but which are relevant to the job order processing and have values set by Control-M.

The runtime scheduling parameters you defined for IDJOB3 appear in the Zoom screen.

Copy
  ===========================================================================
  IN           IDJOB3-ENDED-OK      0202                                     
  RESOURCE IDTAPE-DRIVE         0001      IDCPOWER             0005          
                                                                             
  PIPE                                                                       
  FROM TIME 2300    +     DAYS    UNTIL TIME 0400 +     DAYS  
  DUE OUT TIME 1159 +     DAYS    PRIORITY *5  SAC    CONFIRM N
  TIME ZONE:                    WAIT FOR ODATE:                              
  CPU-ID    NODE NAME           NJE      SEARCH COUNTER 00000                
  ===========================================================================

Of the runtime scheduling criteria you defined, the TIMEFROM and TIMEUNTIL range remains the only problem. You can resolve this by simply changing the TIME values in the Zoom screen.

  1. Change TIME FROM to a value that is an hour earlier than your current system time. Change the UNTIL value to a time that is several hours after the current system time.

    At this point, it is important that you note the following:

    • Any change to a job order in the Zoom screen changes the value for that job order only. The permanent definition that you defined in the Job Scheduling Definition screen remains unchanged.

    • Instead of using the Control-M Why and IOA Conditions/Resources screens to satisfy the other runtime parameters, you could have deleted those parameters from the job order in the Zoom screen.

    • The most important thing to remember is that in actual production circumstances, you do not merely delete parameter values that "get in the way," and you do not intervene in the job control process unless you are fully aware of the potential impact of that intervention.

      These exercises are designed to show you the workings of scheduling parameters and to show you how you can intervene if absolutely necessary. But runtime criteria are defined for a reason, and unless you are certain of what you are doing, intervention can do much more harm than good. For example, intervening to cause the submission of a job before its predecessor job has run can potentially do great damage.

      Therefore, intervention in job processing should be left only to those who are specifically authorized and who have the knowledge necessary to intervene appropriately.

      You can now exit the Zoom screen and see the result.

  2. Enter SAVE in the COMMAND field of the Zoom screen. The Active environment screen is displayed.

Freeing a Held Job

Because you held the job before entering the Zoom screen, the job cannot continue processing until you free it. You do this by entering option F (Free) for the job.

  1. Enter option F for the job order for IDJOB3. A message at the top of the screen indicates that the freeing of the job is performed. The status of the job changes to Requested Free Wait Schedule.

    Copy
    CTM659I FREE OF TASK IDJOB3 GROUP " " ODATE 020201 PERFORMED          <D> - (3)
    COMMAND ===>                                                    SCROLL ==> CRSR
    O Name     Owner    Odate  Jobname  JobID   Typ ----------- Status ------------
      IDJOB3   ID       020201                  JOB Requested Free Wait Schedule 
    ========= >>>>>>>>>>>>>        Bottom of Jobs List       <<<<<<<<<<<<< ========
  2. Periodically refresh the Active Environment screen by pressing Enter.

    During this process, you see the following actions:

    • IDJOB3 changes to Wait Schedule status, and then goes through the regular submission process. The job ends NOTOK (with a condition code of C0008).

    • The Shout message you defined is sent to your terminal. The message is  similar to the following:

      CTM- FRIDAY FISCAL RESULTS RUN FAILED  02.02 14:12 CN(INTERNAL)

    • As a result of the condition code from IDJOB3, job IDJOB4 is forced and is displayed in the Active Environment screen. Job IDJOB4 ends OK.

      Copy
          Filter: IDGS      ------- CONTROL-M  Active  Environment ------ UP    <D> - (3)
          COMMAND ===>                                                    SCROLL ==> CRSR
      O Name     Owner    Odate  Jobname  JobID   Typ ----------- Status ------------
        IDJOB3   ID       020201 M21     /31866   JOB Ended- Not "OK" Due to CC   
        IDJOB4   ID       020201 M21     /31867   JOB Ended "OK"                  
      ========= >>>>>>>>>>>>>        Bottom of Jobs List       <<<<<<<<<<<<< ========

      If desired, you can check the results of the job runs in the Log file. As you did in the last chapter, you can enter option L for either or both jobs.

      Alternatively, you can enter =5 in the COMMAND line to request option 5 of the IOA Primary Option menu. This option displays the IOA Log screen. Once in the IOA Log screen, you can define a filter to filter the job display in much the same way that you did in the Active Environment screen.

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

  • looked closely at the sections in the Job Scheduling Definition screen, and learned about  the following parameters that were not discussed in the last chapter

    • WDAYS

    • MONTHS

    • (DATES)

    • CONTROL

    • RESOURCE

    • TIME FROM / UNTIL

    • PRIORITY

    • ON

    • DO COND

    • DO SHOUT

    • DO FORCEJOB

  • used the following options of the Job List screen

    • P (Display the Job Scheduling Plan screen)

    • F (Force a job order)

  • used the following options of the Active Environment screen

    • H (Hold)

    • F (Free)

    • ? (Display the Why screen)

    • Z (Display the Zoom screen)

  • viewed the scheduling plan of a job in the Job Scheduling Plan screen

  • used the Why screen to see why a job didn’t run, and to add a missing condition

  • filtered the display of the IOA Conditions/Resources screen, and used the screen to add Quantitative resources

  • used the Zoom screen to alter the runtime parameters of a job order

  • learned about the difference between ordering and forcing a job

  • learned more prerequisite conditions and their associated dates, including the PREV date

Recommended Reading

Before continuing with the next chapter, it is recommended that you read the following in the Control-M for z/OS User Guide.

In Chapter 2

  • Description of the Job Scheduling Plan screen, Why screen, Zoom screen and IOA Conditions/Resources screen

In Chapter 3

  • Detailed parameter descriptions of the parameters you have used (mentioned above, under "Review")

The descriptions of the ON and WDAYS parameters are quite detailed. Read those descriptions for a general understanding of parameter usage and possible parameter formats, without trying to memorize all the detail. For now, you can skip the information related to subparameter WCAL in the WDAYS parameter description.