Control-M Event Manager (CMEM)

This chapter includes the following topics:

Overview of CMEM

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

The CMEM facility is an optional facility based on a monitor and a subsystem.

The CMEM facility utilizes sets of user-defined rules that specify events to monitor and actions to perform if a specified event occurs. These rules are defined online through the CMEM Rule Definition facility.

Multiple rules can be defined in a table (member) in a standard partitioned data set (library). Related rules are usually defined in the same table. Multiple tables can be defined in a library, and multiple CMEM rule libraries can be defined.

Types of Events Managed by CMEM

The CMEM facility handles the following events. These can be specified in ON statements in the rule:

Table 227 Events Handled by CMEM

Event

Description

DSNEVENT

Data set disposition, such as cataloged, deleted or kept, during step termination or dynamic decollation, or the occurrence of a NOT CATLGD 2 event, when a data set 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.

  • jobs submitted by a TSO user or by CICS

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

Types of Actions that CMEM Can Perform

Any combination of the following actions can be performed when the specified event occurs. They are specified in DO statements in the rule:

  • add or delete a prerequisite condition

    Prerequisite conditions can be added to or deleted from the IOA Conditions file. This may trigger the submission of jobs in the Active Jobs file. Specified in a DO COND statement in the rule.

  • force a job or table

    A Control-M table or individual job can be forced (that is, ordered to the Active Jobs file regardless of its basic scheduling criteria). Specified in a DO FORCEJOB statement in the rule.

    Jobs can be forced for one of the following reasons:

    • to start a new process in Control-M (that is, new job submission)

    • to enable Control-M to assume full control of an externally submitted job that triggers the event; these jobs are referred to as On Spool jobs, discussed under On Spool Jobs.

  • stop the job in which the event occurs

    At the end of the current job step, terminate the job in which the event occurred. Specified in a DO STOPJOB statement in the rule.

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

  • invoke a Control-O rule

    Control-O rules can be invoked within the current rule. Specified in a DO RULE statement in the rule.

  • send a message

    Messages can be sent to specified locations through the Control-O Shout facility. Specified in a DO SHOUT statement in the rule.

CMEM Rule Ordering, Triggering and Deactivation

CMEM tables, along with their rules, are usually ordered (loaded to memory) when CMEM is started. They can also be refreshed or loaded by an operator command, or manually using the FORCE option in the CMEM Table List screen.

Once a CMEM rule has been loaded in memory, the occurrence of the events specified in its ON statements trigger the rule. All DO statements in the rule are then performed.

More than one rule can be triggered by the occurrence of an event. An event triggers each rule whose ON statement matches the event.

Generally, all actions from all triggered rules are performed.

The one exception occurs when multiple rules are triggered by the same job arrival event and each of the triggered rules contains DO FORCEJOB statements. In this case, the DO FORCEJOB statements of the first triggered rule are performed, but the DO FORCEJOB statements of the other rules triggered by the event are not performed. For more information, see On Spool Jobs.

CMEM rules remain activated, that is, they remain in memory, until they are overridden by the reloading of the rule table or deleted by an operator command.

CMEM AutoEdit Variables

The CMEM facility supports its own set of AutoEdit variables. No other AutoEdit variables can be used by the CMEM facility. Furthermore, in Control-M, these variables can only be specified in CMEM rules, not in job scheduling definitions or JCL.

CMEM AutoEdit variables are resolved upon triggering of the rule. Available CMEM AutoEdit variables are:

Table 228 CMEM AutoEdit Variables

Variable

Description

%%$Dn

nth qualifier of the data set name. For example, if the data set name is AAA.BBB.CCC, %%$D2 resolves to BBB. Valid only for rules containing an ON DSNEVENT statement.

%%$DSN

Name of the data set handled by the rule. Valid only for rules containing an ON DSNEVENT statement.

%%$DSNDISP

Disposition of the data set handled by the rule. Valid only for rules containing an ON DSNEVENT statement.

Possible values are:

  • C – cataloged

  • D – deleted

  • K – kept

  • N – NOT CATLG2

  • R – retained

  • S – scratched

  • U – uncataloged

%%$JNAME

Job name. Valid in rules for all types of events.

%%$SABEND

System abend code of the step whose termination triggered the rule.

%%$STEPCC

Completion code of the step whose termination triggered the rule.

%%$UABEND

User abend code of the step whose termination triggered the rule.

On Spool Jobs

On Spool jobs are jobs or started tasks that are submitted externally to Control-M, such as jobs submitted by TSO users or CICS, or jobs received over the NJE network, but are brought under the control of the Control-M monitor using a CMEM rule.

The CMEM rule that causes a job to be an On Spool job, that is, a CMEM rule that brings the external job under the control of the Control-M monitor, must be an ON JOBARRIV rule or Control-O event (ON DSNEVENT or ON STEP) with a DO FORCEJOB statement. To inform Control-M that this is an On Spool job and not a regular FORCEJOB request, the job scheduling definition forced by the DO FORCEJOB must "match" the arriving job, as described below.

Control-M controls the entire life cycle of the job, from determining when to execute the job to performing job post-processing, according to the forced job scheduling definition.

Control-M processes On Spool jobs slightly differently than it processes regular jobs. Control-M does not submit the job because the job has already been submitted. Instead, Control-M releases the job (if held) when the runtime scheduling criteria are met.

Once the job starts execution, whether the job previously required releasing or not, it is controlled by Control-M in the same way that Control-M controls regular jobs. Control-M waits for the job to finish, reads its sysout, and performs all post-processing actions defined in the job scheduling definition.

Creating On Spool Jobs

The following components are necessary to create On Spool jobs:

  1. job on spool

  2. CMEM rule

  3. job scheduling definition

Below is a detailed explanation of what must be defined for each of the above components to create an On Spool job.

Job On Spool

The job must have the following characteristics:

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

    For users who have the Thruput Manager product installed, a conflict might occur between it and the Control-M On Spool processing.

    Thruput Manager intercepts JES JCL Interpretation processing, and temporarily changes the job's status.   If the Control-M Submittor task requests the job's status while it is being processed by Thruput Manager, it receives a response indicating that the Job is not HELD. As a result, the job is set to status WAIT EXECUTION, and Control-M does not try to release it. In this event, you may see messages from Thruput Manager (for example, DTM1459I) and from the Control-M Submittor (for example, SUB13AI) with the same time-stamp. This indicates that both tasks were processing the job at the same time.

    BMC recommends that the vendor of the Thruput Manager product be contacted to determine if a fix for this problem (to not change the job’s status) has been issued.

    In any case, the JOB card of the On Spool Job must be coded with TYPRUN=JCLHOLD, rather than TYPRUN=HOLD, to cause both Thuput Manager and the JCL Interpreter to process the job only after it has been released by Control-M.

  • The MSGCLASS sysout of the job:

    • for JES3 users: must be equal to the Control-M SYSOUT held class

    • for JES2 users: can be any held SYSOUT class

This enables Control-M to read the job sysout and perform post-processing according to the job scheduling definition.

CMEM Rule

The CMEM rule definition must contain the following:

  • ON JOBARRIV or Control-O Event (ON DSNEVENT or ON STEP) statement

    The job name specified in the ON JOBARRIV/ON DSNEVENT/ON STEP 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. For more information, see ON JOBARRIV (CMEM): Event Parameter, On Spool Job Scheduling Definition Considerations, or ON STEP (CMEM): Event Parameter.

    Control-O users are advised that message rules triggered by $HASP395 (under JES2) or IEF404I (under JES3) are treated the same as JOBEND rules.

  • DO FORCEJOB statement

    The first DO FORCEJOB statement in the rule must force a matching job scheduling definition, described immediately below. For more information, see DO FORCEJOB (CMEM): Action Parameter.

    When monitoring for a group of jobs via job name masking, the JOB parameter in the DO FORCEJOB statement must specify the CMEM AutoEdit variable %%$JNAME. This allows the Control-M monitor to use the job name mask when performing the job name match process in the table. Using this method allows a single CMEM rule to act together with a single job scheduling definition (whose MEMNAME specifies the same job name mask) for jobs that require similar tracking requirements.

Job Scheduling Definition

The job scheduling definition must have the following characteristics:

  • 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 the execution of the job, that is, when the job must be run.

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

Handling On Spool Jobs

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 (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 performs the following actions:

    • 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 On Spool Job Scheduling Definition Considerations

    The forced job appears in the Active Environment screen with status WAIT SCHEDULE ON SPOOL.

  • 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, to release it, if required.

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

    • Otherwise, Control-M verifies that the job is still in the spool (waiting for execution, executing or ended) before deciding to perform post-processing.

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

Control-M can only handle NJE jobs as On Spool jobs when they originate on the same NJE node as that on which Control-M is running.

On Spool Job Scheduling Definition Considerations

Job Forcing Considerations

Only one On Spool job can be created in response to a job arrival event. However, in several cases, multiple DO FORCEJOB actions might match the arriving job. Each of these cases and the job forcing logic applied to them, to prevent multiple On Spool processes for the same external job, are described below.

  • The job arrival rule contains multiple DO FORCEJOB requests. Each might match the arriving job. In this case, job forcing logic is as follows.

    The On Spool process, the match between the external job name and MEMNAME, is performed for the first DO FORCEJOB in the first matching job arrival rule only:

    • If a match is found, the job is an On Spool job.

    • If a match is not found, the job is not an On Spool job, even if subsequent DO FORCEJOB actions might match.

    In either case, all subsequent DO FORCEJOB statements in the same rule (if they exist) are handled normally, that is, not as forcing On Spool jobs.

  • The DO FORCEJOB forces a table in which more than one MEMNAME matches the arriving job. In this case, job forcing logic is as follows.

    If a table containing more than one job is forced, by the first DO FORCEJOB statement in the rule, as described above, the first matching job causes the job to be an On Spool job. All the other jobs in the table are forced as regular Control-M jobs, even if they match the job name of the external job.

  • Multiple job arrival rules are triggered by the same job arrival event, and each rule contains one or more DO FORCEJOB statements that might match the arriving job. In this case, job forcing logic is as follows.

    Only the DO FORCEJOB statements from the first triggered rule are executed, as described above. DO FORCEJOB from all other triggered job arrival rules are ignored.

If an On Spool job was purged from the spool but still remains in the Active Jobs file, and another job with the same name arrives on spool and is assigned the same job ID, that later job is not forced.

JCL Management Considerations

When defining JCL, the following issues must be considered:

  • Any attempt to rerun the job, that is, as a cyclic job, by a DO RERUN statement, or by a manual rerun request, might fail if the JCL of the job is not found in the library specified in the MEMLIB parameter of the job scheduling definition.

  • If the job is not submitted with TYPRUN=HOLD, Control-M cannot determine when the job runs, even if runtime scheduling criteria are defined. In this case, the job might start executing before all the runtime scheduling criteria are satisfied. Post-processing, however, is not performed by Control-M until the runtime scheduling criteria are satisfied.

  • Since On Spool jobs are not submitted by Control-M:

    • The JCL of the On Spool job cannot contain AutoEdit statements, and SETVAR statements in the job definition are ignored. This is because the job is not submitted by Control-M.

    • Because the job is not submitted by Control-M, the following job scheduling definition parameters are ignored:

      • SCHENV

      • SYSTEM ID

      • NJE NODE

    • NJE enhanced tracking support is inoperative

Support for ON DSNEVENT and ON STEP

A DSNEVENT occurs when a file is deallocated, on the happening of one of the following events:

  • the dynamic deallocation of a file

  • deallocation of a file on the termination of a job STEP

  • deallocation of a file on the termination of a job

A STEP event occurs when a step ends.

To support the ON DSNEVENT and ON STEP parameters, CMEM intercepts the messages written by JES2 or JES3 to JESYSMSG. JESYSMSG is the third SYSOUT of the job.

The DSNEVENT process consists of the following parts:

  1. When a job, or STC, or TSO user session starts, the system issues either the IEF403I message or the IEF125I message. CMEM intercepts this message, and checks whether there is at least one ON DSNEVENT or ON STEP rule for the job. If there is at least one rule for the job, CMEM creates the DSNEVENT environment in the address space.

    A job can only be handled by one CMEM. Therefore, in an environment where more than one CMEM can be active, for example, TEST and production, you must be accurate in defining the ON DSEVENT. The DSNEVENT environment for an address space remains intact when a new Control-O instance is started while the previous Control-O instance is still active.

  2. CMEM intercepts allocation, deallocation, and step termination messages, and determines whether there is at least one ON DSEVENT or ON STEP event. If so, CMEM determines

    • whether the DSNEVENT or STEP events fulfil the selection criteria in the rule

    • whether, in the case of a DSNEVENT, the file is a new file or already exists

      A DSNEVENT can be triggered only on the Control-O/CMEM that runs on the same z/OS system on which the event occurs. Even a focal Control-O or CMEM in a Sysplex environment is insufficient. This is because Control-O or CMEM intercepts the messages written to JESYSMSG while they are being written, which can be done only on the same system where the event happens.

  3. CMEM triggers the rule according to the following principles:

    1. An ON STEP rule is always triggered when a STEP ends. However, a STEP is ignored when a rule is not executed due to one of the following:

      • a JCL error

      • failure to encounter a previous step condition code

    2. An ON DSNEVENT can occur when a deallocation message is written, or when a step terminates. Whether it occurs depends on

      • how the file is deallocated

      • the setting of the STEPRC field in the DSNEVENT criteria, as follows:

        • If the value of STEPRC is null, the rule is triggered at the time of deallocation.

        • If the value of STEPRC is other than null, the rule is rechecked at the termination of the step to ascertain the STEPRC criteria.

    3. Deallocation occurs when

      • the file is dynamically deallocated

      • the step ends, in the case of all allocated files in this step, whether the files were allocated by JCL or were dynamically allocated

      • the job terminates, in the case of any file that was not released on step termination, for example, if DISP is set to PASS

For CMEM actions to be triggered in this way, the following conditions must be satisfied:

  • Either the IEF403I message or the IEF125I message must appear in the job log.

  • The job, STC, or TSO user session must have its MSGLEVEL set to (x,1), to ensure that allocation, deallocation and step termination messages are written to the JESYSMSG. It is not sufficient for these messages to appear only in the system log or job log.

  • At least one ON DSNEVENT or ON STEP rule must be ordered and ready before the job, STC, or TSO user session starts.

    If the value of ON DSNEVENT is * (asterisk), every job, STC, or TSO user session is within the DSNEVENT environment. BMC strongly recommends that you do not use this type of DSNEVENT because of the following:

    • The overhead that results from CMEM analyzing every message written to the JESYSMSG for every job, STC, or TSO user session in the whole system.

    • The CMEM limitation that only one CMEM can handle a DSNEVENT for a job. In an environment where more than one CMEM is active on the same system, this definition may cause the wrong CMEM to trap the event.

Regular Allocation and Deallocation

In the case of regular files, meaning files not managed by SMS, CMEM traps the following deallocation messages:

  • IEF283I

  • IEF285I

  • IEF287I

SMS Support

In the case of SMS-managed data sets, CMEM traps the IGD101I and IGD104I allocation and deallocation messages, and determines whether the file is new according to the following rules:

  • If both messages are issued, the file is new.

  • If the IGD101I message is not found, CMEM treats the file as not new.

Generation Data Sets (GDG)

For CMEM to support Generation Data Sets (GDG), the following messages must be found:

  • IGD105I

  • IGD107I

  • IGD108I

  • IGD17101

The messages that are required by CMEM for the purposes of this and the preceding sections are liable to be changed as a result of IBM changes in data set processing.

CMEM Support for FTP

CMEM actions can be triggered by the transfer of files by FTP products.

In order to enable CMEM rules to be triggered by such file transfers, do the following:

  1. Use one of the following methods to insert the expression MSGLEVEL=(1,1) in the STC of the FTP product:

    • Customize the JESxPARM member in the SYS1.PARMLIB library.

    • Modify the job statement in the PROCLIB library member that contains the procedure JCL for the STC of the FTP product.

  2. Start the CMEM monitor with at least one DSNEVENT rule that refers to the STC of the FTP product. You can use a dummy DSNEVENT rule that forces CMEM to monitor the STC of the FTP product.

  3. Start the FTP product.

  4. Modify existing rules, or order new rules (or do both). Rules that have been modified or ordered before a file reaches the FTP server are applied to all files subsequently transferred by the FTP product.

CMEM triggers rules when the requirements of an ON DSNEVENT statement are satisfied. If an FTP product fails to transmit a data set and issues a message relating to this failure, CMEM cannot react to that message. However, you can use CMEM rules to react to FTP product messages.

Do not use the STEPRC subparameter in conjunction with the FTP* setting for ON DSNEVENT, because the same FTP procedure can serve many requests before being terminated.

CMEM Support for IBM FTP

The IBM FTP process is executed under the OMVS address space, which is BPXAS. BPXAS address spaces do not usually write messages to the JESYSMSG.

In order to enable CMEM DSNEVENT support for IBM FTP, the following occurs:

  1. When the CMEM monitor starts, it activates the OpenEdition interface for processes in the BPXAS. Having done this, CMEM issues the following messages:

    Copy
    CTO782I SUBSYSTEM REGISTERED WITH OPENEDITION INTERFACE
    CTO783I INITIALIZATION OF OPENEDITION ENVIRONMENT ENDED SUCCESSFULLY

    When CMEM initialization is complete, message CTO147I is displayed. After this, CMEM gets control every time that an OpenEdition process starts in the BPXAS address space.

  2. When a new process starts in the BPXAS, the interface routine issues the CTO403I pseudo-message. This pseudo-message causes CMEM to simulate IEF403I processing, which is described in Support for ON DSNEVENT and ON STEP.

  3. Under z/OS, IBM FTP functions as a UNIX process running under z/OS. Therefore it follows the UNIX standard, one aspect of which is that the name of the job is set to the userID of the person who issued the FTP request. This UNIX standard creates a problem, because the operator who writes the CMEM rule must know at that stage which user will issue an FTP request.

    The solution to this problem is to use the statement ON DSNEVENT FTP*. The result is that any FTP process will trigger the rule.

Do not use the STEPRC subparameter in conjunction with the FTP* setting for ON DSNEVENT, because the same FTP procedure can serve many requests before being terminated.

Recovering Lost Dataset Events from SMF

In case of a CMEM outage, Control-M CMEM provides a process for recovering the DSNEVENTs that were not handled.

The process involves two utilities, one (CTMEVRT) to retrieve the missing dataset events and a second (CTMEVEX) to execute the matching DO actions (DO COND and DO FORCEJOB). The output file of CTMEVRT is first manually edited by the user, who then provides the edited file as an input to CTMEVEX. Note that only DSNEVENTs are processed; all other non-dataset events are ignored. Similarly, only the DO COND and DO FORCEJOB actions are processed, all other DO actions are ignored.

The CTMEVRT utility uses SMF records written by z/OS and z/OS Communications Server to identify events that occurred during the CMEM outage. The user must specify the start and end times that define the approximate duration of the CMEM outage. The user can also specify include and exclude statements so that only the relevant events will be listed.

The output of CTMEVRT, the DAEVENTS file, is a list of events, identified as most probably requiring handling. BMC recommends that the user review the DAEVENTS file and edit it if necessary (for example, by removing events that are no longer relevant or might have already been processed by CMEM before the outage).

The CTMEVEX utility processes the edited DAEVENTS file, converting the DO actions of the events listed in DAEVENTS to IOACND commands (for adding or deleting conditions) and CTMJOB commands (to order jobs to the Control-M Active Jobs File using the FORCE option).

CTMEVEX can be run in simulation mode for displaying the statements that could be used as the input to the IOACND and CTMJOB utilities. The user can review the statements and decide if any adjustments are required before actually running CTMEVEX in execution mode.

For more information, see the INCONTROL for z/OS Utilities Guide.

Recovery Scenario Example

On January 30, at 11:36 A.M., after applying some maintenance on LPAR SYSA, CMEM stopped working. By 12:10 P.M. the problem was resolved and the CMEM monitor was brought back up.

Since the site has many incoming FTP datasets during the day, it was necessary to recover those events that are usually caught by CMEM (using DSNEVENT rules), but were lost during the CMEM outage.

BMC recommends that you initiate the recovery process as close as possible to the outage, although it is possible to do so in a later stage.

Since batch work and FTP transfers were a little delayed around the outage time (11:36 A.M.), as they mostly run in a discretionary Service Class and the LPAR was highly utilized, the site estimated that jobs were denied CPU for no more than 2 minutes, and therefore set the delay duration to 2 minutes.

To make sure they recovered all the lost DSNEVENTs the site did the following:

  1. Issued a Switch SMF command in SYSA.

    The switch ensured that the SMF records from the outage period were written to a sequential dataset (probably a new generation of a GDG).

  2. Submitted sample job CTMEVRT with the following input (making sure that both the INCLTIME SYSIN parameter and the DASMF DD allocations for the SMF generations cover the delay duration (2 minutes prior to the CMEM outage, 11:34 – 11:36) and the outage duration (11:36 – 12:10):

    Copy
    //DASMF    DD   DISP=SHR,DSN=SMF.SYSA(0)
    //              DISP=SHR,DSN=SMF.SYSA(-1)
    //              DISP=SHR,DSN=SMF.SYSA(-2)
    //SYSIN    DD   *
    INCLTIME=2016/01/30,11:34-2016/01/30,12:10
    SYSID=SYSA

    There is no problem of over-supplying SMF records (for example in this case, supplying SMF records collected from 10:00 to 13:00) since the events are selected for the period specified with the INCLTIME statement.

After CTMEVRT successfully executed, the site reviewed the following DAEVENTS file output, the events list dataset CTMEVRT.EVENTS (DAEVENTS DD) containing the list of extracted DSNEVENTs:

Copy
*Date      Time     SIDC Data Set Name       JobNameDisp RuleName        Actions
2016/01/30 11:34:14 MVS3 N FTP.FILE.INCOMING1FTPUSERC    0001-PROD:FTP* DO COND FILE_INCOMING1 ODAT +
2016/01/30 11:34:14 MVS3 N FTP.FILE.INCOMING1FTPUSERC    0001-PROD:FTP* DO FORCEJOB TABLE FTP JOB FTPA UFLOW N DATE ODAT LIBRARY PROD.JCL
2016/01/30 11:39:22 MVS3 Y FTP.FILE.INCOMING2FTPUSERC    0001-PROD:FTP* DO COND FILE_INCOMING2 ODAT +
2016/01/30 11:39:22 MVS3 Y FTP.FILE.INCOMING2FTPUSERC    0001-PROD:FTP* DO FORCEJOB TABLE FTP JOB FTPA UFLOW N DATE ODAT LIBRARY PROD.JCL

This is an incomplete listing of DAEVENTS; some columns have been removed for better readability.

By cross-referencing the extracted DSNEVENTs with the IOA Log, the site realized that the event from 11:34 A.M. (the cataloging of data set FTP.FILE.INCOMING1) was actually already fully handled by CMEM. Therefore, it was excluded from further processing by commenting it out.

This is how CTMEVRT.EVENTS looked like after the change:

Copy
*Date      Time     SIDC Data Set Name       JobNameDisp RuleName          Actions
*2016/01/30 11:34:14 MVS3 N FTP.FILE.INCOMING1FTPUSERC    0001-PROD:FTP* DO COND FILE_INCOMING1 ODAT +
*2016/01/30 11:34:14 MVS3 N FTP.FILE.INCOMING1FTPUSERC    0001-PROD:FTP* DO FORCEJOB TABLE FTP JOB FTPA UFLOW N DATE ODAT LIBRARY PROD.JCL
2016/01/30 11:39:22 MVS3 Y FTP.FILE.INCOMING2FTPUSERC    0001-PROD:FTP* DO COND FILE_INCOMING2 ODAT +
2016/01/30 11:39:22 MVS3 Y FTP.FILE.INCOMING2FTPUSERC    0001-PROD:FTP* DO FORCEJOB TABLE FTP JOB FTPA UFLOW N DATE ODAT LIBRARY PROD.JCL

After the site decided that the edited DAEVENTS file was appropriate, the site submitted the sample job CTMEVEX. The CTMEVEX utility converted the CTMEVRT.EVENTS (DAEVENTS DD) DO actions to commands, and because the user set the SIMULATE parameter to NO, executed them using IOACND and CTMJOB.

By reviewing DAPRINT for IOACND and SYSPRINT for CTMJOB the site ensured that all the DO actions (DO FORCEJOB or DO COND) were executed successfully. On successful completion, the DSNEVENTs that CMEM had missed during its outage had been recovered and their actions executed.

CMEM Rule Parameters: Summary

Figure 338 CMEM Rule Definition Screen

Copy
RL: JOBNAM1    LIB CTM.PROD.RULES                      TABLE: CMEMRULE
COMMAND ===>                                           SCROLL===> CRSR
+--------------------------------------------------------------------+
  ON JOBARRIV = JOBNAM1 JTYPE   SMFID      SYSTEM           And/Or/Not 
  OWNER CTMCTLMGROUP                     MODE PROD    RUNTSEC NONE  
  THRESHOLD                                                           
  DESCRIPTION CONVERSION: ON JOB JOBNAM1ARRIVAL FORCEJOB            
  DESCRIPTION                                                         
  ====================================================================
  DO FORCEJOB = TABLE  TABLE1     JOB           UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                             
  DO                                                                  
  ====================================================================
======= >>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
                                                                                    
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF               21.00.36

The parameters of the CMEM Rule Definition screen are divided into the following categories:

  • Event Selection Parameters

  • General Parameters

  • Action Parameters

A brief summary of the parameters in each category is provided on the following pages. This is followed by a detailed description of each parameter in alphabetical order.

CMEM Event Selection Parameters

The following parameters identify the events that trigger the rule.

Table 229 CMEM Event Selection Parameters

Parameter

Description

ON statement

Event criteria that must be satisfied for the rule to be triggered. Subparameters may be displayed. Valid ON statements are:

  • ON DSNEVENT – name (or mask) of the job to be monitored for data set or NCT2 events

  • ON JOBARRIV – job name (or mask) of a job or started task that arrived on the JES spool from any source

  • ON JOBEND – job name (or mask) of a job or started task that terminated

  • ON STEP – job step whose termination is to be monitored for a specified return code or status

Subparameters of these parameters are described in the detailed description of each parameter later in this chapter.

CMEM General Parameters

The following parameters contain general information about the rule.

Table 230 CMEM General Parameters

Parameter

Description

OWNER

ID of user who requests CMEM services

GROUP

Name of a group of rules

MODE

CMEM rule operation mode

RUNTSEC

Type of runtime security checks to be performed for the rule

DESCRIPTION

Free-text description of the rule definition

CMEM Action Parameters

The following parameters (DO statements) specify actions to be performed.

Table 231 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 active:

  • 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

CMEM Parameter Descriptions

The following pages contain detailed descriptions of all parameters available in the CMEM Rule Definition screen. Parameters are arranged in alphabetical order. Within each parameter, subparameters are arranged according to the order of the fields on the screen.

Each parameter begins on a new page, including:

  • a brief explanation of the purpose of the parameter

  • the format required for defining the parameter within an extract of the CMEM screen

  • general information explaining the parameter and its usage

  • where applicable, some practical examples illustrating implementation of the parameter

For more information on the CMEM Rule Definition facility, see Online Facilities.

DESCRIPTION (CMEM): General Parameter

Description of the rule to be displayed in the Rule List screen.

Figure 339 DESCRIPTION (CMEM) Parameter Format

Optional. The DESCRIPTION parameter consists of one or more lines that can contain free text. Each line is 61 characters in length. Upon typing text in a DESCRIPTION line and pressing Enter, a new DESCRIPTION line is opened.

General Information for DESCRIPTION (CMEM)

The DESCRIPTION parameter does not affect rule processing. The text entered in the first DESCRIPTION line appears to the right of the rule name in the Rule List screen. It is intended to let the user know at a glance the purpose of, or some other key information about, the rule. The text can be typed in any language.

Example for DESCRIPTION (CMEM)

The description START THE BATCH SHIFT appears next to the rule name in the Rule List screen.

Figure 340 DESCRIPTION (CMEM) Parameter Example

Copy
RL: CICSPROD   LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
 ON JOBEND   = CICSPROD JTYPE   SMFID    SYSTEM            And/Or/Not
 OWNER ADMIN    GROUP CICS                    MODE PROD    RUNTSEC
 THRESHOLD
 DESCRIPTION   START THE BATCH SHIFT
 DESCRIPTION
 ====================================================================
 /* INFORM CONTROL-M THAT THE BATCH CAN BE STARTED
 DO COND     = START-BATCH          ODAT +
 DO
 ====================================================================
======= >>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

DO Statement (CMEM): Action Parameter

Actions to perform when the rule is triggered.   

Figure 341 DO (CMEM) Parameter Format

At least one DO statement must be specified in each rule. Specify DO statements as follows:

  • Type the action keyword (such as COND) in the DO field and press Enter.

  • When required, subparameter fields are displayed. Fill in the subparameters and press Enter again.

Multiple DO statements can be specified. After entering a DO statement, another DO line is automatically displayed. Multiple DO statements have an AND relationship and are performed sequentially.

The following are valid DO actions. Each is discussed individually in this chapter.

Table 232 DO (CMEM) Parameter Actions

Action

Description

DO COND

Adds and/or deletes one or more prerequisite conditions

DO FORCEJOB

Forces a job

DO STOPJOB

Stops execution of the job that triggered the rule, at the end of the current step

If Control-O is active:

DO RULE

Invokes a Control-O rule

DO SHOUT

Sends a message to a specified destination

DO COND (CMEM): Action Parameter

Add or delete prerequisite conditions.    

Figure 342 DO COND (CMEM) Parameter Format

Optional. Type the word COND (or its abbreviation CON) in the DO field and press Enter. The following subparameters are displayed:

Table 233 DO COND (CMEM) Subparameters

Subparameter

Description

condition

User-supplied, descriptive name of 1 through 20 characters used to identify the condition. Only trailing blanks are permitted.

dateref

4-character date reference associated with the condition. Valid values are:

  • date – specific date, in mmdd or ddmm format, depending on the site standard

  • ODAT – resolves to the current installation working date
    Default.

  • DATE – resolves to the current system date

  • STAT – static
    Indicates that the condition, such as IMS-ACTIVE, is not date-dependent

    Before STAT was introduced, date 0101 was recommended to be used in conditions that were not date-dependent. Unlike 0101, STAT is not a date, and it operates differently. Always use STAT when defining conditions that are not date-dependent.

  • **** /$$$$ – all dates
    Valid only for deleting prerequisite conditions. Either value (**** or $$$$) results in the deletion of all matching prerequisite conditions regardless of date.

cond_opt

Indicator of whether to add or delete the prerequisite condition. Valid values are:

  • + – add the prerequisite condition

  • - – delete the prerequisite condition

General Information for DO COND (CMEM)

When a rule containing a DO COND statement is triggered, the designated prerequisite conditions are added or deleted (as specified) from the IOA Conditions file by the Control-M monitor.

A prerequisite condition can define any user-specified situation. The following are a few examples of prerequisite conditions:

Copy
IMS-ACTIVE
WEEKEND
SALARY-OK

Prerequisite conditions created or deleted by the DO COND parameter can activate or deactivate Control-O rules, or trigger (or stop) the execution of processes (jobs, and so on) in Control-M, Control-D and other environments.

CMEM AutoEdit System variable %%$JNAME and, for ON DSNEVENT events, variables %%$Dx, %%$DSN, or %%$DSNDISP can be specified in condition names in DO COND statements and are replaced (resolved) at time of rule triggering. For more information, see CMEM AutoEdit Variables.

Representative dates (such as ODAT) are resolved to the actual corresponding date in the site-standard format.

Long condition names cannot be used in CMEM rule definitions.

Examples for DO COND (CMEM)

When job CICSPROD ends, this rule sets the condition necessary for the batch shift to begin.

Figure 343 DO COND (CMEM) Parameter – Example 1

Copy
RL: CICSPROD   LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBEND   = CICSPROD JTYPE   SMFID      SYSTEM         And/Or/Not 
  OWNER ADMIN    GROUP CICS                    MODE PROD   RUNTSEC    
  THRESHOLD                                                           
  DESCRIPTION   START THE BATCH SHIFT                                 
  DESCRIPTION                                                         
  ===================================================================
  /* INFORM CONTROL-M THAT THE BATCH CAN BE STARTED                   
  DO COND     = START-BATCH          ODAT +                      
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

When a data set with name prefix TRAN arrives by file transfer product CONNECT DIRECT (formerly called NDM), add prerequisite condition FILE-RECEIVED to notify Control-M that the data set was received.

Figure 344 DO COND Parameter – Example 2

Copy
RL: NDM        LIB CTM.PROD.RULES                          TABLE: MGT
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON DSNEVENT = NDM      JTYPE   SMFID      SYSTEM                
     DSN      TRAN.*                                      DISP CATLG 
     PROCSTEP            PGMSTEP            STEPRC OK      And/Or/Not 
  OWNER ADMIN    GROUP NDM                     MODE         RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   NOTIFY CONTROL-M THAT TRAN DATASET ARRIVED VIA NDM    
  DESCRIPTION                                                         
  ===================================================================
  DO COND     = FILE-RECEIVED        ODAT +                       
  DO                                                                  
 ====================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

DO FORCEJOB (CMEM): Action Parameter

Force a job.

Figure 345 DO FORCEJOB (CMEM) Parameter Format

Optional. Type the word FORCEJOB (or its abbreviation F) in the DO field and press Enter. The following subparameters are displayed:

Table 234 DO FORCEJOB (CMEM) Subparameters

Subparameter

Description

TABLE

Name of a table, up to eight characters. Mandatory.

JOB

Name of the job to be triggered. Optional. If blank, all jobs in the table are forced.

If AutoEdit System variable %%$JNAME is specified, it resolves to the name of the job that triggered the rule.

UFLOW

Whether to force a unique job flow for the jobs in a table.

Relevant only when the JOB name is left blank.

A unique flow is not affected by conditions that might already exist as relationships between jobs in the AJF. This is accomplished by automatically adding unique suffixes (up to 3 characters long) to the new condition names.

Valid values are:

  • Y – Flow will be unique.

  • N – Flow will not be unique. Default.

DATE

Scheduling date of the job. Valid values are:

  • date – specific 6-digit date, in format mmddyy, ddmmyy, or yymmdd, depending on the site standard

  • ODAT – resolves to the current installation working date
    Default.

  • DATE – resolves to the current system date

LIBRARY

Name of the scheduling library containing the specified table. Mandatory.

The following CMEM Auto-Edit variables are available to newly forced jobs and can be used in the Control-M job scheduling definition or JCL:

Table 234a CMEM AutoEdit Variables

Variable

Description

%%$DSN

Name of the data set handled by the rule. Valid only for rules containing an ON DSNEVENT statement.

%%$DSNDISP

Disposition of the data set handled by the rule. Valid only for rules containing an ON DSNEVENT statement.

Possible values are:

  • C – cataloged

  • D – deleted

  • K – kept

  • N – NOT CATLG2

  • R – retained

  • S – scratched

  • U – uncataloged

%%$JNAME

Triggering job name. Valid in rules for all types of events.

%%$SABEND

System abend code of the step whose termination triggered the rule.

%%$STEPCC

Completion code of the step whose termination triggered the rule.

%%$UABEND

User abend code of the step whose termination triggered the rule.

General Information for DO FORCEJOB (CMEM)

DO FORCEJOB places a job order in the Control-M Active Jobs file, even if the basic scheduling criteria of the job are not satisfied. For more information, see Job Ordering and Job Forcing.

The DO FORCEJOB statement in CMEM enables Control-M to order Control-M tables based on the occurrence of an event, for example, job arrival, job end, data set event, or step event.

When forcing all jobs in a table, the UFLOW subparameter enables you to determine whether the jobs are run as a unique flow.

The DO FORCEJOB statement is executed by the Control-M monitor.

If the Control-M monitor is not active, the DO FORCEJOB request is queued and performed when the Control-M monitor becomes active.

DO FORCEJOB logic works differently for job arrival events than for job end, data set or step events:

Job End Events

DO FORCEJOB statements specified in a job end event rule are performed only if the terminating job is not under Control-M.

Data set or Step Events

Data set or step event rules are performed regardless of where the job was submitted. However, if the triggering job was ordered or submitted by Control-M, the job will not become an On Spool job. For more information about On Spool jobs, see On Spool Jobs.

Job Arrival Events

For the first DO FORCEJOB statement in a rule:  

  • If the job that triggered the job arrival event was submitted by Control-M, the DOFORCEJOB statement is ignored.

  • If the job that triggered the job arrival event was not submitted by Control-M, Control-M forces the requested table or job. Control-M scans the forced table looking for a job whose MEMNAME value matches, or is a mask for, the name of the job whose arrival triggered the rule.

    • If a matching job is found, it becomes an On Spool job. For more information, see Creating On Spool Jobs.

    • If a matching job is not found, or more than one job is ordered, all other jobs are not On Spool jobs, and are processed normally by Control-M.

For other DO FORCEJOB statements in the same rule:

  • DO FORCEJOB is performed regardless of the source of the job.

  • The table is forced.

DO FORCEJOB is not executed if a preceding ON JOBARRIV rule with a DO FORCEJOB action was already executed for this event.

When a DO FORCEJOB request fails because the table is in use, Control-M may try again to execute the job, depending on the values set for the FORCE#RT and FORCE#WI installation parameters. For more information on the FORCE#RT and FORCE#WI installation parameters, see the customization chapter of the INCONTROL for z/OS Installation Guide.

Examples for DO FORCEJOB (CMEM)

Control all jobs not submitted by Control-M.

Figure 346 DO FORCEJOB (CMEM) – Example 1

Copy
RL: *          LIB CTM.PROD.RULES                         TABLE: JOBS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBARRIV = *       JTYPE J SMFID      SYSTEM          And/Or/Not 
  OWNER ADMIN    GROUP EXTJOBS                MODE         RUNTSEC    
  THRESHOLD                                                           
  DESCRIPTION   CONTROL ALL JOBS NOT SUBMITTED BY CONTROL-M           
  DESCRIPTION                                                         
  ===================================================================
  DO FORCEJOB = TABLE  ANYJOB   JOB            UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                         
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

Table ANYJOB must contain at least one job scheduling definition.

Control all jobs submitted by CICS. These fall into the following groups: Jobs whose name starts with A and jobs whose name starts with C. A unique job flow is forced for the jobs.

Figure 347 DO FORCEJOB (CMEM) – Example 2

Copy
RL: A*         LIB CTM.PROD.RULES                         TABLE: JOBS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBARRIV = A*       JTYPE J SMFID      SYSTEM       And/Or/Not O
  ON JOBARRIV = C*       JTYPE J SMFID      SYSTEM       And/Or/Not
  OWNER ADMIN    GROUP CICS                    MODE         RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION CONTROL ALL JOBS SUBMITTED BY CICS
  DESCRIPTION (BEGINNING WITH A*OR C*)                               
  DESCRIPTION                                                        
  ===================================================================
  DO FORCEJOB = TABLE  CICSJOB  JOB %%$JNAME   UFLOW Y    DATE  ODAT
                LIBRARY CTM.PROD.SCHEDULE                           
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

Table CICSJOB must contain at least two job scheduling definitions:

  • One must contain a MEMNAME value beginning with A.

  • Another must contain a MEMNAME value beginning with B.

DO RULE (CMEM): Action Parameter

Invoke a Control-O rule from within the current rule. Available only if Control-O is active.

Figure 348 DO RULE (CMEM) Parameter Format

Optional. Type the word RULE (or its abbreviation RU) in the DO field and press Enter. The following subparameters are displayed:

Table 235 DO RULE (CMEM) Subparameters

Subparameter

Description

rulename

Name of the Control-O rule to be executed. A maximum of eight characters can be entered.

The rule to be executed must contain an ON RULE statement with the same rule name specified in this parameter.

args

Optional input and output arguments to be passed to the rule can be specified, following the rulename and separated from it by a blank. Arguments must be valid AutoEdit expressions separated by commas. An unlimited number of arguments can be specified. However, the combined length of the rulename and arguments cannot exceed 45 characters.

OWNER

Value of the OWNER field in the invoked rule. This subparameter is used for security purposes. Optional.

TABLE

Name of the Control-O rule table in which the invoked rule resides. When ALL is entered, it implies that the invoked rule may reside in any rule table. If a table name is not entered, the current rule table is assumed by default.

LIBRARY

Name of the Control-O rule table library where the invoked rule resides. When ALL is entered, it implies that the invoked rule may reside in any rule table library. If a library name is not specified, the current rule table library is assumed by default.

General Information for DO RULE (CMEM)

To define a DO RULE statement in a CMEM rule, and to access a CMEM rule containing a DO RULE statement, Control-O must be installed.

To order a CMEM rule containing a DO RULE statement and to invoke the Control-O rule specified in the CMEM DO RULE statement, Control-O must be active.

When a DO RULE statement is encountered during rule processing, Control-O invokes the specified rule. When processing of the invoked rule is completed, processing continues sequentially from the point after the DO RULE statement in the initial (calling) rule.

When a DO RULE statement is executed, the specified rule is searched for among the loaded rules according to the specified rule name, table, library, and owner. If the rule is found but is not active, for example, if the runtime scheduling criteria are not satisfied, the "invoked" rule is not executed and the calling rule continues execution with the next DO statement.

The CMEM calling rule can pass an argument string as input to the called rule. This argument string can contain CMEM AutoEdit expressions that are resolved at time of rule execution. The argument string can be accessed by the called rule through Control-O System variable %%$ARGS. If a called rule calls another Control-O rule, the %%$ARGS values passed in the earlier call are overwritten by the %%$ARGS values passed by the later call. For information about the AutoEdit facility in Control-O, see the Control-O User Guide.

A Control-O rule specified with an ON RULE statement can be invoked any number of times by DO RULE calls.

A called Control-O rule can invoke other Control-O rules using DO RULE statements. Nesting of DO RULE calls, for example, rule 1 calls rule 2, that calls rule 3, up to 20 deep is supported. A Control-O rule can be called recursively.

Example for DO RULE (CMEM)

When a data set named PROD.TRAN.* is cataloged by TCPIP, invoke a Control-O rule that starts a task to process it.

Figure 349 DO RULE Example

Copy
RL: TCPIP      LIB CTM.PROD.RULES                        TABLE: TRANS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON DSNEVENT = TCPIP    JTYPE   SMFID      SYSTEM                    
     DSN      PROD.TRAN.*                                  DISP CATLG 
     PROCSTEP            PGMSTEP            STEPRC OK     And/Or/Not  
  OWNER ADMIN    GROUP TCPIP                   MODE         RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   WHEN DATASET PROD.TRAN.* IS CATALOGED BY TCIP,        
  DESCRIPTION   START A TASK TO PROCESS IT                            
  DESCRIPTION                                                         
  ===================================================================
  /* START A STARTED TASK TO PROCESS THE RECEIVED FILE.               
  /* WHEN THE DATASET IS CATALOGED, INVOKE RULE PROCFILE.             
  /* PARAMETERS PASSED ARE THE STC NAME AND THE TIMEOUT VALUE.        
  DO RULE     = PROCFILE  %%$DSN                         OWNER  PROD  
     TABLE    PRODRULE   LIBRARY CTO.PROD.RULES                       
     SYSTEM              SHARELOC       TIMEOUT                       
  DO                                                                  
  ===================================================================
======= >>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< ======
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF,             21.00.36

DO SHOUT (CMEM): Action Parameter

Send ("shout") a message to a specific destination. Available only if Control-O is active.

Figure 350 DO SHOUT (CMEM) Parameter Format

Optional. Type SHOUT in the DO field and press Enter. The following subparameters are displayed:

Table 236 DO SHOUT (CMEM) Subparameters

Subparameter

Description

TO

Destination of the message (1 through 16 characters). Mandatory. Valid values are:

  • U-userid or USERID-userid – Writes the message to the IOA Log file under the specified user ID. userid must be 1 through 8 characters.

  • OPER [dd] [-{rrr | -ccc}] – Sends the message to operator consoles, according to the optional subparameters dd, rrr, and ccc

    • dd: Descriptor code (from 0 through 16). For more detailed information regarding descriptor codes, refer to the IBM publication Routing and Descriptor Codes, GC38-1102.

    • rrr: Route code (from 0 through 128). For more detailed information regarding route codes, refer to the IBM publication Routing and Descriptor Codes, GC38-1102. Route code and console ID are mutually exclusive.

    • -ccc : Console ID number (preceded by a hyphen) of the console to which the message is to be shouted. Console ID and route code are mutually exclusive.

 

  • TSO - loginid [;Nn | ;Mm | ;NnMm | ;Lname] – Sends the message to the user identified by the specified logon ID. logonid is mandatory (1 through 7 characters).
    An optional second value, indicating the computer and/or node (such as Nn) of the TSO logonid, can be entered, as follows:

    Under JES2:

    • m is the machine ID (the computer in JES2, not the 4-character SMF ID). For more information, see the description of specifying IOA CPU in the discussion of the customization process in the INCONTROL for z/OS Installation Guide.

    • n is the 1 or 2 character JES/NJE node ID.

    Under JES3:

    The only valid value is Lname, where name is the logical JES name of the machine (that is, the name as used in JES3, command *T, not the SMF system ID).

    For more information, see the description of specifying IOA CPU in the discussion of the customization process in the INCONTROL for z/OS Installation Guide.

    A shout to a TSO user performs a TSO SEND command that may require authorization at the receiving node.

  • U-M: mail-name-prefix – Sends a message by mail to the recipient identified by mail-name-prefix (1through 12 characters).

  • U-ECS – Sends messages to the Control-M/Enterprise Manager user. For more information on this feature, see the section on shouting to Control-M/Enterprise Manager in Job Production Parameters.

URGENCY

Determines the priority level of the message. For more information, see "The URGENCY subparameter" in General Information for DO SHOUT (CMEM). Valid values are:

  • R - Regular. Default.

  • U - Urgent.

  • V - Very urgent.

SYSTEM

Name of the system (computer) where the message must be directed. A name of one to eight alphanumeric characters can be entered. Mask characters (* and ?) are supported for this subparameter.

If no SYSTEM value is specified, the message is sent to the system identified by reserved user-defined variable %%$COMMSYS in a preceding DO SET statement. For a description of %%$COMMSYS, see the Control-O User Guide.

If %%$COMMSYS is not specified, the message is issued on the current system.

Can be used only when Control-O is installed.

CTO282I

Indicates if the message ID is prefixed by CTO282I. Optional. Valid values are:

  • Y (Yes) – The message ID is prefixed by CTO282I. Default.

  • N (No) – The message ID is the first word of the message text.

MESSAGE

Message text. Maximum Length: 60 characters. Mandatory.

General Information for DO SHOUT (CMEM)

The message is sent to the required destination when the accompanying ON statement criteria are satisfied.

It is also possible to shout to a ROSCOE user. For additional information, see your INCONTROL administrator.

Subparameter TO (CMEM)

Type TO=USERID-userid to write the message to the IOA Log under the user ID specified in the parameter.

Type TO=OPER[dd]-{rrr,-ccc} to send the message to all operator consoles, or to operator consoles selected according to route code (rrr) or console ID number (-ccc). The descriptor code (dd) determines the type of message displayed. The dd, rrr, and -ccc parameters are optional and can be assigned any valid value. Dashes (–) are used to separate the parameters specified.

For more detailed information regarding route and descriptor codes, refer to the IBM publication Routing and Descriptor Codes, GC38-1102.

Examples

Table 237 DO SHOUT OPER (CMEM) Subparameter Examples

Subparameter

Description

OPER

Send the message to all operator consoles.

OPER2

Send a highlighted unrollable message (descriptor code 2) to all operator consoles.

OPER-5

Send a message to operator consoles associated with route code 5.

OPER2-5

Send a highlighted unrollable message to operator consoles associated with route code 5.

OPER-4

Send a message to operator console ID 04.

OPER2-4

Send a highlighted unrollable message (descriptor code 2) to operator console ID 04.

Type TO=TSO-logonid to send the message to a groupid or logonid. The Shout facility first searches the IOA Dynamic Destination table for the specified ID. If the table contains an entry that matches the value, the content of the entry is used as the target for the shouted message. The entire TO field is used. Therefore, when directing the message to a remote user, do not append Nn or Mm. Instead, do this in the IOA Dynamic Destination Table itself. For more information, see the description of Dynamic Destination Tables in the INCONTROL for z/OS Administrator Guide.

If no matching ID is found in the Dynamic Destination table, the Shout facility assumes the specified ID is a logonid. It then creates a TSO message that it hands over to MVS. MVS then sends the message to that logonid. If the logonid does not exist, MVS cannot send the message, but no error message is generated. When a second value is used, the message is sent to the TSO logonid in the specified computer or node (machine ID). To determine the machine ID under JES2, enter JES command $D MEMBER.

The URGENCY subparameter

The URGENCY value indicates the urgency level of the message.

In addition, if the destination is USERID-userid (or U-userid), the user can control, according to urgency, which messages are displayed when the IOA Log file is accessed. Urgent and very urgent messages are highlighted on the screen. For more details, see IOA Log Facility.

The CTO282I Subparameter

By default, the CTO282I subparameter has a value of Y, and CTO282I is placed as the message ID preceding the message text. When CTO282I is set to N, the first word of the message text becomes the message ID.

Control-O AutoEdit Variables

Control-O AutoEdit variables embedded in the TO and MSG subparameters are automatically resolved at time of rule activation. For more information about the AutoEdit facility, see JCL and AutoEdit Facility.

Example for DO SHOUT (CMEM)

When started task DB2MSTR ends, issue a message to the DBA who is on duty. Notice the use of the generic TSO user name, that the Dynamic Destination table interprets to be one or more TSO users.

Figure 351 DO SHOUT (CMEM) Parameter Example

Copy
RL: DB2MSTR    LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBEND   = DB2MSTR  JTYPE S SMFID      SYSTEM        And/Or/Not  
  OWNER ADMIN    GROUP DB2                     MODE         RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   WARN DBA THAT DB2 MASTER ENDED                        
  DESCRIPTION                                                         
  ===================================================================
  DO SHOUT    = TO TSO-DBA         URGENCY  U  SYSTEM         CTO282I
     MESSAGE DB2 MASTER ENDED - PLEASE CHECK!                        
  DO                                                                 
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

DO STOPJOB (CMEM): Action Parameter

Stop execution of the job that triggered the rule after the current step.

Figure 352 DO STOPJOB (CMEM) Parameter Format

Optional. Type STOPJOB, or its abbreviation ST, in the DO field and press Enter.

General Information for DO STOPJOB (CMEM)

When DO STOPJOB is performed, the job that triggered the rule is terminated after the current step, and no further steps (including those marked COND=EVEN or COND=ONLY) are executed. An appropriate message is written to the job log. If the stopped job is controlled by Control-M, it terminates with a status of ENDED NOTOK.

DO STOPJOB is not executed for TSO users.

DO STOPJOB is meaningful only:

  • for data set events or step events

  • when there are additional steps in a job or started task

Example for DO STOPJOB (CMEM)

If the production data set disposition is NOT CATLGD 2, stop the job.

Figure 353 DO STOPJOB (CMEM) Parameter Example

Copy
RL: PROD*      LIB CTM.PROD.RULES                          TABLE: JOBC
OMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON DSNEVENT = PROD*    JTYPE J SMFID      SYSTEM                    
     DSN      PROD.*                                       DISP NCT2  
     PROCSTEP            PGMSTEP            STEPRC         And/Or/Not 
  OWNER ADMIN    GROUP PRODJOBS                MODE         RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   STOP THE JOB ON NCT2 DISPOSITION                      
  DESCRIPTION                                                         
  ===================================================================
  /* STOP THE JOB                                                     
  DO STOPJOB                                                    
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

GROUP (CMEM): General Parameter

Name of the group to which the rule belongs.

Figure 354 GROUP (CMEM) Parameter Format

Optional. Name of 1 through 20 characters, with no embedded blanks.

General Information for GROUP (CMEM)

The GROUP parameter is used to provide more convenient handling of rules. It enables retrieval of information on a group basis. The group name appears in all important IOA Log file messages relating to the rules of the group.

Example for GROUP (CMEM)

The rule that instructs Control-M to start the batch shift when CICSPROD ends belongs to group CICS.

Figure 355 GROUP (CMEM) Parameter Example

Copy
RL: CICSPROD   LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBEND   = CICSPROD JTYPE   SMFID      SYSTEM         And/Or/Not
  OWNER ADMIN    GROUP CICS                    MODE PROD    RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   START THE BATCH SHIFT                                 
  DESCRIPTION                                                         
  ===================================================================
  /* INFORM CONTROL-M THAT THE BATCH CAN BE STARTED                   
  DO COND     = START-BATCH          ODAT +                      
  DO                                                                  
  ===================================================================
======= >>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

MODE (CMEM): General Parameter

Rule operation mode.

Figure 356 MODE (CMEM) Parameter Format

Optional. Valid values, and their abbreviations, for the MODE parameter are:

Table 238 MODE (CMEM) Parameter Values

Value

Description

PROD (P)

Standard Production mode. The rule is processed normally. Default.

TEST (T)

Test mode. Actions are not performed, but are written to a test journal.

LOG (L)

Log mode. The rule is processed normally and all identified events and actions are written to a test journal.

General Information for MODE (CMEM)

Test mode provides the opportunity to test the effects of a rule definition without actually performing the specified DO actions.

Log mode provides a transition between Test and Production mode. Like Production mode, Log mode enables performance of the specified DO actions. However, Log mode also records the trace information in the test journal for tracking purposes.

When tracking of the performed actions for test purposes is no longer required, the rule can be placed in Production mode.

For sites in which Control-O is not installed, or in which the Control-O Automation Log facility is not active, the trace information is written to the sysout referenced by DD statement DAACTLOG.

For Control-O sites in which the Automation Log facility is active, the trace information is recorded in the Automation log. For more information, see the Control-O User Guide.

Example for MODE (CMEM)

The rule that instructs Control-M to start the batch shift when CICSPROD ends is activated in Production mode.

Figure 357 MODE (CMEM) Parameter Example

Copy
RL: CICSPROD   LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBEND   = CICSPROD JTYPE   SMFID      SYSTEM         And/Or/Not  
  OWNER ADMIN    GROUP CICS                    MODE PROD    RUNTSEC   
  DESCRIPTION   START THE BATCH SHIFT                                 
  DESCRIPTION                                                         
  ===================================================================
  /* INFORM CONTROL-M THAT THE BATCH CAN BE STARTED                   
  DO COND     = START-BATCH          ODAT +                           
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

ON Statement (CMEM): Event Parameter

Event selection criteria that trigger performance of the rule.

Figure 358 ON (CMEM) Parameter Format

Mandatory. At least one ON statement must be entered. Type an ON statement, or its abbreviation, in the ON field and press Enter. Additional subparameters are displayed.

The following are valid ON statements (and their abbreviations). Each is described in detail later in this chapter.

Table 239 ON (CMEM) Parameter Statements

Statement

Description

ON DSNEVENT (D)

Name (or mask) of a job, started task, or TSO user to be monitored for data set events

ON JOBARRIV (JA)

Job name (or mask) of a job or started task that arrived on the JES spool from any source

ON JOBEND (JE)

Job name (or mask) of a job or started task that terminated

ON STEP (S)

Name (or mask) of a procedure step (and optionally, program step) to be monitored for termination

The And/Or/Not subparameter is always displayed in each specified ON statement. It is a conjunctional parameter for linking ON statements. Optional.

Entering a value for this subparameter opens a new ON statement and links the newly opened statement to the current ON statement.

When multiple ON statements are entered, the combinations of ON statements that can satisfy the selection criteria depend on the And/Or/Not values linking those ON statements. The logic applied to And/Or/Not subparameters is described in "General Information", which follows.

Valid values are:

  • A (And) – indicates AND logic between the two statements
    If both ON statements are true, the event criteria are satisfied.

  • O (Or) – indicates OR logic between the preceding and following ON statements
    If either statement is true, the event criteria are satisfied.

  • N (Not) – indicates AND NOT logic between the two statements
    If the prior statement is true and the subsequent statement is false, the event criteria are satisfied.

General Information for ON Statement (CMEM)

Upon typing an ON parameter and pressing Enter, additional fields (subparameters) are displayed. Each ON parameter and its subparameters comprise an ON statement. At least one ON statement is required in a rule definition. Additional ON statements can be entered using the And/Or/Not option.

The first eight characters of the event name appear as the name of the rule in the Rule List screen.

And/Or/Not Subparameter Logic (CMEM)

The following logic is applied:

  • AND and NOT logic are applied before OR logic

  • NOT means AND NOT as represented below

  • A NOT B is interpreted as A AND (NOT B)

  • A OR B AND C is interpreted as A OR (B AND C)

  • A AND B OR C NOT D is interpreted as [(A AND B) OR (C AND NOT D)]

Use of OR logic reduces the amount of redundant data in the CMEM rule library and improves rule management.

When entering multiple ON statements, ensure that the statements are not mutually exclusive or not connected by an AND parameter. Rules containing mutually exclusive ON statements connected by an AND parameter are never triggered. To prevent confusion, the AND is blocked during the ON statement definition.

Copy
ON DSNEVENT JOBA STEPA
AND 
ON DSNEVENT JOBA STEPB

Character Masking (CMEM)

The following mask characters can be used when entering ON statement values:

  • * represents any number of characters, including no characters

  • ? represents any one character

ON DSNEVENT (CMEM): Event Parameter

Monitor a data set disposition event.

Figure 359 ON DSNEVENT (CMEM) Parameter Format

Optional. Type D (DSNEVENT) in the ON field and press Enter. The following subparameters are displayed:

Table 240 DSNEVENT (CMEM) Subparameters

Subparameter

Description

jobname

Name (or mask) of the job to be monitored for data set events. Mandatory.

JTYPE

Type of job to be monitored for data set events:

  • J (Job) – batch job

  • S (STC) – started task

  • T (TSU) – TSO user

  • blank – any type of job; valid only if STEPRC is blank, that is, the rule is processed immediately upon detection of the data set event. Default.

If JTYPE is entered, only a data set event occurring in a job of the specified type can trigger the rule.

SMFID

SMF ID of the CPU to monitor for data set events. Mask characters (* and ?) are supported. Default: current CPU.

SYSTEM

Name of the system to monitor for data set events. Mask characters (* and ?) are supported. Default: current system.

DSN

Name of data set (or mask) to be monitored for this event within the selected jobs. Mandatory.

DISP

Data set disposition. Mandatory. The abbreviation (that is, the first letter) of the desired value can be specified. Valid values are:

  • CATLG – Cataloged (including SMS-managed files and ROLLED-IN SMS-managed GDG files).

  • DELETE – Deleted.

  • UNCATLG – Uncataloged.

  • KEEP – Kept (including SMS-managed files).

  • RETAIN – Cataloged or Kept.

  • SCRATCH – Deleted and uncataloged (SMS managed files).

  • NCT2 – Occurrence of a NOT CATLG 2 event – when a data set was created in a previous job step, but not cataloged at deallocation because its name already exists in the z/OS catalog.

  • ALL – Any of the above dispositions.

  • * – Any of the above data set dispositions, except NCT2.

PROCSTEP

Name or mask of a step invoking a procedure or, for a started task, task ID. Optional.

If omitted, all procedure steps in the selected jobs are monitored.

When a started task is initiated, it can be assigned a task ID. For example, in command S GTF.G, the task ID of GTF is G. If a task ID is not entered, MVS assigns a default task ID to the started task, as follows:

  • For a system started task with stepname IEFPROC, MVS sets an internal task ID.

  • For other started tasks, the default task ID equals the procedure (started task) name.

Therefore, when using CMEM to monitor system started tasks, if no task ID is entered in the START command, the PROCSTEP parameter must not be specified.

PGMSTEP

Name (or mask) of a step invoking a program. Optional.

If omitted, all program steps in the selected jobs are monitored.

When a system started task with stepname IEFPROC is initiated, MVS assigns the step a default program step name. Therefore, when using CMEM to monitor these system started tasks, the PGMSTEP parameter must not be specified.

STEPRC

Determines at which point in the job step, and under what conditions in the job step, the DO statements are performed. Valid values are:

  • blank – if no completion code is entered, the rule is executed immediately upon detection of the specified data set event

If any of the following values is entered for STEPRC, execution of the DO statements is delayed until the end of the monitored job step and is dependent upon how the jobstep ended:

  • OK – step ended with a condition code of zero

  • NOTOK – step ended with a nonzero code

  • **** – step ended (with any code)

  • Cnnnn – step ended with the indicated condition code

  • Snnn – step ended with the indicated system abend code

  • Unnnn – step ended with the indicated user abend code

Asterisks can be entered instead of code digits; condition codes and abends can be preceded by code qualifiers (<, >, N). For more information, see the following section, "General Information".

If you use STEPRC in a long-running task, rules do not execute until tasks such as STC (such as CICS, IMS) or TSO USER terminate.

And/Or/Not

Conjunctional parameter that opens a new ON statement and links it to the previous ON statement. Optional. Valid values are:

  • A (And) – indicates AND logic between the two ON statements

  • O (Or) – indicates OR logic between the preceding and following sets of ON statements

  • N (Not) – indicates AND NOT logic between the two ON statements

General Information for ON DSNEVENT (CMEM)

ON DSNEVENT rules are triggered by the setting of data set disposition at time of deallocation (during step termination or dynamic deallocation).

DO statements in the rule are executed either immediately upon detection of the data set event or at the end of the job step that caused the data set event, depending on the value entered in the STEPRC subparameter (described above).

Immediate execution is useful for performing actions when data sets are dynamically de-allocated using long running address spaces (for example, CICS, TSO users, and file transfer monitors).

CMEM must be active before any tasks tracked by ON DSNEVENT rules begin; moreover, ON DSNEVENT rules only intercept data set events for jobs, started tasks, or TSO users that started after the rule was ordered.

To monitor data set events for a job, started task or TSO user, the job, started task or TSO user must have MSGLEVEL=(1,1) and message IEF403I or IEF125I must appear in the job log. A DSNEVENT can be triggered only on the Control-O/CMEM that runs on the same z/OS system on which the event occurs. Even a focal Control-O or CMEM in a Sysplex environment is insufficient. This is because Control-O or CMEM intercepts the messages written to JESYSMSG while they are being written, which can be done only on the same system where the event happens.

ON DSNEVENT rules do not intercept data set events, such as cataloging, uncataloging, or scratching, when they are performed using MVS CATALOG or SCRATCH macros.

The following restrictions apply to ON DSNEVENT statements:

  • Do not specify an ON DSNEVENT statement with any other type of ON statement in a rule.

  • Do not specify different STEPRC values in the same rule. If you do, the last specified value is used.

Entering values for the optional subparameters PROCSTEP, PGMSTEP and STEPRC limits the situations that can satisfy the step termination event. Conversely, if a subparameter is blank, that subparameter is ignored.

For example,

  • If a PGMSTEP and PROCSTEP value are both entered, the rule is triggered only if the specified PGMSTEP is completed in the specified PROCSTEP.

  • If a PGMSTEP value is entered without a PROCSTEP value, the rule is triggered if the PGMSTEP is completed anywhere within the job stream.

BMC recommends applying a filter on the job name (instead of using ON DSNEVENT *) when using ON DSNEVENT rules. Using a filter will significantly reduce overhead to the system.

The STEPRC Subparameter (CMEM)

When entering a condition code or abend code in the STEPRC subparameter, any characters in the code can be replaced by an asterisk (*). An asterisk means "any value" for the character it replaces. For example, if S*13 is entered, the code criteria is satisfied by codes S013, S613, S913, and so on.

When entering condition and/or abend codes, the following qualifiers can be used as indicated:

Table 241 Valid STEPRC Code Qualifiers

Qualifier

Description

<

Greater than. Valid for condition codes and user abend codes.

>

Less than. Valid for condition codes and user abend codes.

N

Triggers the rule if the specified code does not exist in the step. Valid as a qualifier for condition codes, user abend codes, and system abend codes.

The SMFID and SYSTEM Subparameters (CMEM)

The default values for the SMFID and SYSTEM subparameters are the current system. If no value is entered for either SMFID or SYSTEM, the rule is triggered only by events that occur in the current system.

Example for ON DSNEVENT (CMEM)

When a new production data set is created, trigger a backup job.

Figure 360 ON DSNEVENT (CMEM) Parameter Example

Copy
RL: PRDJ0003   LIB CTM.PROD.RULES                       TABLE: BACKUP
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON DSNEVENT = PRDJ0003 JTYPE   SMFID      SYSTEM                    
     DSN      PROD.*                                       DISP CATLG 
     PROCSTEP            PGMSTEP            STEPRC OK      And/Or/Not 
  OWNER ADMIN    GROUP BACKUP                  MODE PROD    RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   NEW DATASET CREATED - TRIGGER A BACKUP JOB            
  DESCRIPTION                                                         
  ===================================================================
  /* SCHEDULE A CONTROL-M JOB TO HANDLE THE BACKUP                    
  /*                                                                  
  DO FORCEJOB = TABLE  BACKUP   JOB BACKUP     UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                        
  /*                                                                  
  DO                                                                  
  ===================================================================
======= >>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF,             21.00.36

ON JOBARRIV (CMEM): Event Parameter

Monitor a job arrival event on the JES spool.

Figure 361 ON JOBARRIV (CMEM) Parameter Format

Optional. Type JA (JOBARRIV) in the ON field and press Enter. The following subparameters are displayed:

Table 242 ON JOBARRIV (CMEM) Subparameters

Subparameter

Description

jobname

Job name (or mask). Mandatory. For more information, see Character Masking.

JTYPE

Type of job that can trigger the rule. Optional. Valid values are:

  • J (JOB) – batch job

  • S (STC) – started task

  • T (TSU) – TSO user

  • blank – if no value is entered, the rule can be triggered by any type of job. Default.

SMFID

SMF ID of the CPU to monitor for job arrival events. Mask characters (* and ?) are supported. Default: current CPU.

SYSTEM

Name of the system to monitor for job arrival events. Mask characters (* an ?) are supported. Default: current system.

And/Or/Not

Conjunctional parameter that opens a new ON statement and links it to the previous ON statement. Optional. Valid values are:

  • A (And) – indicates AND logic between the two ON statements

  • O (Or) – indicates OR logic between the preceding and following sets of ON statements

  • N (Not) – indicates AND NOT logic between the two ON statements

General Information for ON JOBARRIV (CMEM)

ON JOBARRIV statements can be used to trigger Control-M actions based on the appearance of a job on the JES spool.

Combination of an ON JOBARRIV statement and a DO FORCEJOB statement can be used to control an external job through Control-M. Such a job is called an On Spool job. For more information, see On Spool Jobs.

The default values for the SMFID and SYSTEM subparameters are the current system. If no value is entered for either SMFID or SYSTEM, the rule is triggered only by events that occur in the current system.

For JES3 users: JOBARRIV rules are processed on the global CPU.

Example for ON JOBARRIV (CMEM)

Backup jobs submitted outside Control-M must be monitored by Control-M.

Figure 362 ON JOBARRIV (CMEM) Parameter Example

Copy
RL: BKP*       LIB CTM.PROD.RULES                       TABLE: BACKUP
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBARRIV = BKP*     JTYPE   SMFID      SYSTEM         And/Or/Not
  OWNER ADMIN    GROUP BACKUP                  MODE PROD    RUNTSEC
  DESCRIPTION   MONITOR EXTERNAL BACKUP JOBS                      
  DESCRIPTION                                                         
  ===================================================================
  /* TELL CONTROL-M TO MONITOR THIS JOB                               
  /*                                                                  
  DO FORCEJOB = TABLE  BACKUP   JOB            UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                             
  /*                                                                  
  DO                                                                  
  ===================================================================
==== >>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<< ==
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

ON JOBEND (CMEM): Event Parameter

Monitor a job termination event.

Figure 363 ON JOBEND (CMEM) Parameter Format

Optional. Type JE (JOBEND) in the ON field and press Enter. The following subparameters are displayed:

Table 243 JOBEND (CMEM) Subparameters

Subparameters

Description

jobname

Job name (or mask). Mandatory.

JTYPE

Type of job whose termination can trigger the rule. Optional. Valid values are:

  • J (JOB) – batch job

  • S (STC) – started task

  • T (TSU) – TSO user

  • blank – if no value is entered, the rule can be triggered by the termination of any type of job. Default.

SMFID

SMF ID of the CPU to monitor for job termination events. Mask characters (* and ?) are supported. Default: current CPU.

SYSTEM

Name of the system to monitor for job termination events. Mask characters (* and ?) are supported. Default: current system.

And/Or/Not

Conjunctional parameter that opens a new ON statement and links it to the previous ON statement. Optional. Valid values are:

  • A (And) – indicates AND logic between the two ON statements

  • O (Or) – indicates OR logic between the preceding and following sets of ON statements

  • N (Not) – indicates AND NOT logic between the two ON statements

General Information for ON JOBEND (CMEM)

ON JOBEND statements can be used to trigger Control-M actions based on the termination of a job.

The default values for the SMFID and SYSTEM subparameters are the current system. If no value is entered for either SMFID or SYSTEM, the rule is triggered only by events that occur in the current system.

For JES3 users: JOBEND rules are processed on the same CPU that executed the specified job.

Example for ON JOBEND (CMEM)

Instruct Control-M to start the batch shift when CICSPROD ends.

Figure 364 ON JOBEND (CMEM) Parameter Example

Copy
RL: CICSPROD   LIB CTM.PROD.RULES                         TABLE: STCS
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBEND   = CICSPROD JTYPE   SMFID      SYSTEM         And/Or/Not
  OWNER ADMIN    GROUP CICS                    MODE PROD    RUNTSEC   
  DESCRIPTION   START THE BATCH SHIFT                                 
  DESCRIPTION                                                         
  ===================================================================
  /* INFORM CONTROL-M THAT THE BATCH CAN BE STARTED                   
  DO COND     = START-BATCH          ODAT +                        
  DO                                                                  
  ===================================================================
======= >>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

ON STEP (CMEM): Event Parameter

Monitor a job step termination event.

Figure 365 ON STEP (CMEM) Parameter Format

Optional. Type S (STEP) in the ON field and press Enter. The following subparameters are displayed:

Table 244 ON STEP (CMEM) Subparameters

Subparameter

Description

job

Name (or mask) of the job to be monitored for step termination. Mandatory.

JTYPE

Type of job to be monitored for step termination. Optional. Valid values are:

  • J (Job) – batch job

  • S (STC) – started task

  • T (TSU) – TSO user task

  • blank – any type of job. Default.

If JTYPE is entered, only the termination of steps from the specified type of job can trigger the rule.

SMFID

SMF ID of the CPU to monitor for data set events. Mask characters (* and ?) are supported. Default: current CPU.

SYSTEM

Name of the system to monitor for data set events. Mask characters (* and ?) are supported. Default: current system.

PROCSTEP

Name (or mask) of a step invoking a procedure or, for a started task, task ID. Optional. If omitted, all procedure steps in the selected jobs are monitored.

When a started task is initiated, it can be assigned a task ID. For example, in command S GTF.G, the task ID of GTF is G. If a task ID is not entered, MVS assigns a default task ID to the started task, as follows:

  • For a system started task with stepname IEFPROC, MVS sets an internal task ID.

  • For other started tasks, the default task ID equals the procedure (started task) name.

Therefore, when using CMEM to monitor system started tasks, if no task ID is entered in the START command, do not specify the PROCSTEP parameter.

PGMSTEP

Name (or mask) of a step invoking a program. Optional. If omitted, all program steps in the selected jobs are monitored.

When a system started task with stepname IEFPROC is initiated, MVS assigns the step a default program step name. Therefore, when using CMEM to monitor these system started tasks, do not specify the PGMSTEP parameter.

STEPRC

Return codes and/or statuses returned upon termination of the specified steps that satisfy the step termination criteria. Valid values are:

  • ‘‘ (Blank) or **** – step ended with any code or status
    If no value or four asterisks are entered, the return code or status is irrelevant.

  • OK – step ended with a condition code of 0

  • NOTOK – step ended with a nonzero code

  • Cnnnn – step ended with the indicated condition code

  • Snnn – step ended with the indicated system abend code

  • Unnnn – step ended with the indicated user abend code

Asterisks can be entered instead of code digits; condition codes and abends can be preceded by code qualifiers (<, >, N). For more information, see the following section, "General Information".

And/Or/Not

Conjunctional parameter that opens a new ON statement and links it to the previous ON statement. Valid values are:

  • A (And) – indicates AND logic between the two ON statements

  • O (Or) – indicates OR logic between the preceding and following sets of ON statements

  • N (Not) – indicates AND NOT logic between the two ON statements

General Information for ON STEP (CMEM)

ON STEP rules are triggered when specified job steps terminate with specified return codes or statuses.

Entering values for the optional subparameters PROCSTEP, PGMSTEP and STEPRC limits the situations that can satisfy the step termination event. Conversely, if a subparameter is blank, that subparameter is ignored.

  • If a PGMSTEP and PROCSTEP value are both entered, the rule is triggered only if the specified PGMSTEP is completed in the specified PROCSTEP.

  • If a PGMSTEP value is entered without a PROCSTEP value, the rule is triggered if the PGMSTEP is completed anywhere within the job stream.

CMEM must be active before any tasks tracked by ON STEP rules begin; moreover, ON STEP rules only intercept data set events for jobs, started tasks, or TSO users that started after the rule was ordered.

To monitor data set events for a job, started task or TSO user, the job, started task or TSO user must have MSGLEVEL=(1,1) and message IEF403I or IEF125I must appear in the job log. A DSNEVENT can be triggered only on the Control-O/CMEM that runs on the same z/OS system on which the event occurs. Even a focal Control-O or CMEM in a Sysplex environment is insufficient. This is because Control-O or CMEM intercepts the messages written to JESYSMSG while they are being written, which can be done only on the same system where the event happens.

The SMFID and SYSTEM Subparameters

The default values for the SMFID and SYSTEM subparameters are the current system. If no value is entered for either SMFID or SYSTEM, the rule is triggered only by events that occur in the current system.

The STEPRC Subparameter

When entering a condition code or abend code in the STEPRC subparameter, any characters in the code can be replaced by an asterisk (*). An asterisk means "any value" for the character it replaces. For example, if S*13 is entered, the code criteria is satisfied by codes S013, S613, S913, and so on. When entering condition and/or abend codes, the following qualifiers can be used as indicated:

Table 245 ON STEP Subparameter STEPRC Qualifiers

Qualifier

Description

>

Greater than. Valid for condition codes and user abend codes.

<

Less than. Valid for condition codes and user abend codes.

N

Triggers the rule if the specified code does not exist in the step. Valid as a qualifier for condition codes, user abend codes, and system abend codes.

Example for ON STEP (CMEM)

When step STEP2 in job PRD00010 is completed, add a prerequisite condition indicating that a file has been created.

Figure 366 ON STEP (CMEM) Parameter Example

Copy
RL: PRD00010   LIB CTM.PROD.RULES                     TABLE: CMEMRULE
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON STEP     = PRD00010 JTYPE   SMFID      SYSTEM                
     PROCSTEP STEP2      PGMSTEP            STEPRC OK      And/Or/Not
  OWNER CTMCTLM  GROUP                      MODE PROD    RUNTSEC NONE 
  THRESHOLD                                                           
  DESCRIPTION FOLLOWING STEP2 IN JOB PRD00010 ADD A CONDITION         
  DESCRIPTION INDICATING THAT THE FILE WAS CREATED                    
  DESCRIPTION                                                         
  ===================================================================
  DO COND     = FILE-CREATED         ODAT +                       
  DO                                                                  
  ===================================================================
======= >>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

OWNER (CMEM): General Parameter

Identifies the user requesting CMEM services.

Figure 367 OWNER (CMEM) Parameter Format

Mandatory. The OWNER parameter must be 1 through 8 characters.

General Information for OWNER (CMEM)

The OWNER parameter is primarily used by the internal security mechanism of CMEM to determine, together with an external security product, such as TOP SECRET, RACF or ACF2, those operations each user is authorized to perform.

Example for OWNER (CMEM)

The INCONTROL administrator is authorized to use the rule used to monitor the arrival of backup jobs.

Figure 368 OWNER (CMEM) Parameter Example

Copy
RL: BKP*       LIB CTM.PROD.RULES                       TABLE: BACKUP
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON JOBARRIV = BKP*     JTYPE   SMFID      SYSTEM         And/Or/Not 
  OWNER ADMIN    GROUP BACKUP                  MODE PROD    RUNTSEC   
  THRESHOLD                                                           
  DESCRIPTION   MONITOR STARTUP OF BACKUP JOBS                        
  DESCRIPTION                                                         
  ===================================================================
  /* TELL CONTROL-M TO MONITOR THIS JOB                               
  /*                                                                  
  DO FORCEJOB = TABLE  BACKUP   JOB            UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                             
  /*                                                                  
  DO                                                                  
  ===================================================================
======= >>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF              21.00.36

RUNTSEC (CMEM): General Parameter

Specifies the runtime security environment for the rule.

Figure 369 RUNTSEC (CMEM) Parameter Format

Optional. The abbreviation, that is, the first letter, of the desired value can be entered. Valid values are:

Table 246 Valid RUNTSEC (CMEM) Values

Value

Description

NONE

Runtime security checks are not performed for this rule.

OWNER

Runtime security checks are performed using the user ID entered in the OWNER field of the rule. The specified value is effective only if RUNTDFT is not set to DISABLE.

TRIGGER

Runtime security checks are performed using the user ID associated with the started task, TSO user, or batch job that invoked the rule. The specified value is effective only if RUNTDFT is not set to DISABLE.

' ' (Blank space)

Runtime security is determined by Global parameter RUNTDFT (NONE,OWNER, or TRIGGER) in the CMMPARM member for CMEM and in the CTOPARM member for Control-O. By default, the value of RUNRDFT is set to DISABLE, which means that run time security is disabled and it overrides any RUNTSEC in the rules. To enable run time security a value other than DISABLE must be specified for RUNTDFT.

For CMEM: A CMMPARM member is provided in IOAENV that does not have a definition for the RUNTDFT parameter. To enable run time security, CMMPARM must be copied from IOAENV to the PARM library and a value (not DISABLE) of RUNTDFT must be specified.

Copy
SECURITY RUNTDFT=NONE,
RUNTCACH=100 RUNTIME SECURITY CACHE specified.

Value TRIGGER applies only to ON DSNEVENT, ON STEP, or ON JOBEND event rules. If the value TRIGGER is entered for an ON JOBARRIV event rule, the value is treated as OWNER.

General Information for RUNTSEC (CMEM)

The RUNTSEC parameter is used by the CMEM security interface for interaction with external security products, such as CA-RACF, CA-TOP SECRET, and CA-ACF2. For more information see the INCONTROL for z/OS Security Guide.

CMEM security checks are carried out in two stages: at order time and at runtime.

At order time, security checks are carried out to ascertain whether the owner of the rule, as specified in the OWNER subparameter, is authorized to code each one of the rule statements.

At runtime, additional security checks are carried out to determine whether the user who owns the rule (RUNTSEC=OWNER) or the user who triggered the rule (RUNTSEC=TRIGGER) is authorized to execute a DO COND or DO FORCEJOB statement defined in the rule.

Example for RUNTSEC (CMEM)

Perform a backup using the security ID of the job that triggered the rule.

Figure 370 RUNTSEC (CMEM) Parameter Example

Copy
RL: PRDJ0003   LIB CTM.PROD.RULES                       TABLE: BACKUP
COMMAND ===>                                          SCROLL===> CRSR
+-------------------------------------------------------------------+
  ON DSNEVENT = PRDJ0003 JTYPE   SMFID      SYSTEM                    
     DSN      PROD.*                                      DISP CATLG  
     PROCSTEP            PGMSTEP            STEPRC OK     And/Or/Not  
  OWNER ADMIN    GROUP BACKUP              MODE PROD  RUNTSEC TRIGGER
  THRESHOLD                                                           
  DESCRIPTION   NEW DATASET CREATED - TRIGGER A BACKUP JOB            
  DESCRIPTION                                                         
  ===================================================================
  /* SCHEDULE A CONTROL-M JOB TO HANDLE THE BACKUP                    
  /*                                                                  
  DO FORCEJOB = TABLE  BACKUP   JOB BACKUP     UFLOW N    DATE ODAT
                LIBRARY CTM.PROD.SCHEDULE                             
  /*                                                                  
  DO                                                                  
  ===================================================================
======= >>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<< =====
FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF,             21.00.36

THRESHOLD (CMEM): Runtime Scheduling Parameter

Limits the number of times that a rule can be triggered in one CMEM Monitor cycle.

Figure 371 THRESHOLD (CMEM) Parameter Format

Optional. Valid values are 1 through 999999999.

General Information for THRESHOLD (CMEM)

The THRESHOLD parameter is used to prevent unlimited loops within the system. The value assigned to the parameter indicates the maximum number of times that CMEM will trigger the rule in a single CMEM interval.

Before CMEM triggers a rule, it determines whether the rule has already been triggered the maximum number of times in the current CMEM interval. If so, CMEM does not trigger the rule again, but instead sets the STATUS of the rule to SUSPEND and issues message CTO285W to the console.

If no value, or a value of 0, is entered for THRESHOLD, CMEM does not limit the number of times that the rule can be triggered.

Example for THRESHOLD (CMEM)

Limit execution of the following rule to 10 executions. Do not allow the rule to be triggered until it is released from SUSPEND status.

Figure 372 THRESHOLD (CMEM) Parameter Example

Copy
RL: PRDJOB01   LIB CTM.PROD.RULES                          TABLE: JOB
COMMAND ===>                                          SCROLL===> CRSR
+--------------------------------------------------------------------
  ON JOBARRIV = JOBNM233 JTYPE   SMFID      SYSTEM         And/Or/Not 
  OWNER N18      GROUP                       MODE PROD    RUNTSEC     
  THRESHOLD 000000010                                                 
  DESCRIPTION                                                         
   ==================================================================
  DO COND     = JOBNX-ARRIVED        ODAT +                           
  DO                                                                  
  ===================================================================
======= >>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<< ====
=====FILL IN RULE DEFINITION. CMDS: CAPS, EDIT, SHPF         13.21.53