CTB - Manual
CTB - Manual
9.0.18.100
User Guide
May 2018
Contacting BMC Software
You can access the BMC Software website at http://www.bmc.com. From this website, you can obtain
information about the company, its products, corporate offices, special events, and career opportunities.
United States and Canada
Address BMC SOFTWARE INC Telephone 713 918 8800 Fax 713 918 8000
2103 CITYWEST BLVD 800 841 2031
HOUSTON TX
77042-2827
USA
Telephone (01) 713 918 8800 Fax (01) 713 918 8000
2
Restricted rights legend
U.S. Government Restricted Rights to Computer Software. UNPUBLISHED -- RIGHTS RESERVED UNDER
THE COPYRIGHT LAWS OF THE UNITED STATES. Use, duplication, or disclosure of any data and
computer software by the U.S. Government is subject to restrictions, as applicable, set forth in FAR
Section 52.227-14, DFARS 252.227-7013, DFARS 252.227-7014, DFARS 252.227-7015, and DFARS
252.227-7025, as amended from time to time. Contractor/Manufacturer is BMC SOFTWARE INC, 2101
CITYWEST BLVD, HOUSTON TX 77042-2827, USA. Any contract notices should be sent to this address.
Customer support
You can obtain technical support by using the BMC Software Customer Support website or by contacting
Customer Support by telephone or e-mail. To expedite your inquiry, see “Before contacting BMC.”
Support website
You can obtain technical support from BMC 24 hours a day, 7 days a week at
http://www.bmc.com/support. From this website, you can:
Read overviews about support services and programs that BMC offers
Find the most current information about BMC products
Search a database for issues similar to yours and possible solutions
Order or download product documentation
Download products and maintenance
Report an issue or ask a question
Subscribe to receive proactive e-mail alerts when new product notices are released
Find worldwide BMC support center locations and contact information, including e-mail addresses, fax
numbers, and telephone numbers
Support by telephone or e-mail
In the United States and Canada, if you need technical support and do not have access to the web, call
800 537 1813 or send an e-mail message to [email protected]. (In the subject line, enter
SupID:<yourSupportContractID>, such as SupID:12345). Outside the United States and Canada,
contact your local support center for assistance.
Before contacting BMC
Have the following information available so that Customer Support can begin working on your issue
immediately:
Product information
• Product name
• Product version (release number)
• License number and password (trial or permanent)
Operating system and environment information
• Machine type
• Operating system type, version, and service pack or other maintenance level such as PUT or PTF
3
• System hardware configuration
• Serial numbers
• Related software (database, application, and communication) including type, version, and service
pack or maintenance level
Sequence of events leading to the issue
Commands and options that you used
Messages received (and the time and date that you received them)
• Product error messages
• Messages from the operating system, such as file system full
• Messages from related software
License key and password information
If you have questions about your license key or password, contact BMC as follows:
(USA or Canada) Contact the Order Services Password Team at 800 841 2031, or send an e-mail
message to [email protected].
(Europe, the Middle East, and Africa) Fax your questions to EMEA Contracts Administration at +31 20
354 8702, or send an e-mail message to [email protected].
(Asia-Pacific) Contact your BMC sales representative or your local BMC office.
Third party Software
For the provisions described in the BMC License Agreement and Order related to third party products or
technologies included in the BMC Product, see
https://docs.bmc.com/docs/display/workloadautomation/Control-M+Workload+Automation+Documentati
on and click Third-party software (TPS).
4
Contents
About this guide ........................................................................................................... 12
Conventions Used in this Guide ..................................................................................................... 14
Information New to this Version .................................................................................................... 16
Information Relating to Control-M/Restart Users ............................................................................ 16
Related Publications ..................................................................................................................... 17
Introduction ................................................................................................................. 19
INCONTROL Products and IOA ...................................................................................................... 20
Control-M/Analyzer Capabilities ..................................................................................................... 23
Data Types .................................................................................................................................. 24
Automated Actions ....................................................................................................................... 25
Unattended Balancing Operations .................................................................................................. 26
Extended IOA Capabilities ............................................................................................................. 26
Control-M/Analyzer Quality Control ................................................................................................ 26
How Control-M/Analyzer Works ..................................................................................................... 29
Methods of Invoking Control-M/Analyzer ........................................................................................ 30
Input Data Sources ...................................................................................................................... 30
Control-M/Analyzer Runtime Environment ...................................................................................... 31
Balanced Data .............................................................................................................................. 32
Job Flow Under Control-M/Analyzer ............................................................................................... 32
Control-M/Analyzer Implementation............................................................................................... 33
Invoking the Control-M/Analyzer Runtime Environment .................................................................. 41
Control-M/Analyzer Components ................................................................................................... 46
IOA Environment .......................................................................................................................... 52
Prerequisite Condition Concept ...................................................................................................... 52
IOA Calendar Facility .................................................................................................................... 54
Date Definition Concepts............................................................................................................... 55
5
Rule Activity Display Facility ........................................................................................................ 157
Condition and Resource Handling Facility ..................................................................................... 180
IOA Log Facility .......................................................................................................................... 195
IOA Calendar Facility .................................................................................................................. 204
Utilities Under ISPF..................................................................................................................... 219
6
FILTERW: Functions ................................................................................................................... 296
FIND: Functions ......................................................................................................................... 298
FINDCH: Functions ..................................................................................................................... 299
GETJUL: Functions ..................................................................................................................... 300
GETWDAY: Functions ................................................................................................................. 302
HOWMANY: Functions ................................................................................................................ 304
INT: Functions ........................................................................................................................... 306
ISDSN: Functions ....................................................................................................................... 307
ISMEM: Functions....................................................................................................................... 308
ISNUMBER: Functions ................................................................................................................. 310
ISSYSOUT: Functions ................................................................................................................. 312
ISVAR: Functions ....................................................................................................................... 314
LENGTH: Functions .................................................................................................................... 316
LINECOUNT: Functions ............................................................................................................... 317
MAX: Functions .......................................................................................................................... 318
MEMLINES: Functions ................................................................................................................. 320
MIN: Functions ........................................................................................................................... 322
MOD: Functions ......................................................................................................................... 324
NEXTVAR: Functions ................................................................................................................... 326
NOT: Functions .......................................................................................................................... 329
POW: Functions ......................................................................................................................... 330
REPLACE: Functions ................................................................................................................... 331
SQRT: Functions ........................................................................................................................ 333
SUBSTR: Functions ..................................................................................................................... 334
SUM: Functions .......................................................................................................................... 336
TOLER: Functions ....................................................................................................................... 338
TOLOWER: Functions ................................................................................................................. 340
TOUPPER: Functions................................................................................................................... 341
TRIMB: Functions ....................................................................................................................... 342
TRIML: Functions ....................................................................................................................... 343
WORD: Functions ....................................................................................................................... 344
WORDNUM: Functions ................................................................................................................ 346
7
DESC: Basic Rule Parameter ....................................................................................................... 360
DO Statement: Automated Balancing Statement........................................................................... 361
DO ADDSYM: Automated Balancing Statement ............................................................................. 364
DO BLOCK: Automated Balancing Statement ................................................................................ 368
DO CALLUSER: Automated Balancing Statement .......................................................................... 371
DO COMMIT: Automated Balancing Statement ............................................................................. 373
DO COND: Automated Balancing Statement ................................................................................. 378
DO EXIT: Automated Balancing Statement ................................................................................... 381
DO EXTRACT: Automated Balancing Statement ............................................................................ 382
DO GETMEM: Automated Balancing Statement............................................................................. 397
DO GOTO: Automated Balancing Statement ................................................................................. 399
DO MAIL: Automated Balancing Statement .................................................................................. 402
DO PRINT: Automated Balancing Statement ................................................................................ 405
DO PUTMEM: Automated Balancing Statement ............................................................................. 412
DO REMARK: Automated Balancing Statement ............................................................................. 414
DO RULE: Automated Balancing Statement .................................................................................. 416
DO SET: Automated Balancing Statement .................................................................................... 418
DO SHOUT: Automated Balancing Statement ............................................................................... 421
DO SYSOUT: Automated Balancing Statement.............................................................................. 425
DO TERMINAT: Automated Balancing Statement .......................................................................... 428
EXECUTE: Data Selection Statement ............................................................................................ 430
GROUP: Data Selection Statement ............................................................................................... 433
IF: Data Selection Statement ...................................................................................................... 435
ON Statement: Data Selection Statement ..................................................................................... 438
ON CLASS: Data Selection Statement .......................................................................................... 445
ON COMPARE: Data Selection Parameter ..................................................................................... 448
ON DATA: Data Selection Statement............................................................................................ 458
ON DB2: Data Selection Statement .............................................................................................. 461
ON DDNAME: Data Selection Statement....................................................................................... 465
ON DSN: Data Selection Statement ............................................................................................. 467
ON FILE: Data Selection Statement ............................................................................................. 469
ON PAGE: Data Selection Statement ............................................................................................ 471
ON SYSDATA: Data Selection Statement ...................................................................................... 474
ON SYSOUT: Data Selection Statement ........................................................................................ 477
ON VSAM: Data Selection Statement ........................................................................................... 480
OPTIONS: Basic Rule Parameter .................................................................................................. 484
OWNER: Basic Rule Parameter .................................................................................................... 485
UPDATED... BY: Basic Rule Parameter ......................................................................................... 487
WHEN: Rule Definition Structure ................................................................................................. 488
Rule Definition Using an Editor .................................................................................................... 507
8
Rule Definition Structure ............................................................................................................. 508
Language Syntax ........................................................................................................................ 510
Command Reference .................................................................................................................. 511
Rule Definition Process Examples ................................................................................................ 521
9
Activating Program CTBRECL ...................................................................................................... 603
Reconciliation Functions .............................................................................................................. 604
DD Statements ........................................................................................................................... 621
Return Codes ............................................................................................................................. 622
10
B Reserved Words .................................................................................................... 673
11
About this guide
Control-M/Analyzer is a component member of the INCONTROL™ by BMC family of products. This guide is
the basic publication on how to use Control-M/Analyzer software. It should be used by any person who
wants to verify and balance data using Control-M/Analyzer.
This guide contains detailed information about Control-M/Analyzer functions and facilities, and contains
the following chapters:
Introduction (on page 19)
An overview of Control-M/Analyzer. Introducing key concepts used by Control-M/Analyzer, this chapter
provides an overall description of the Control-M/Analyzer balancing environment and its integration into
your operations environment. BMC recommends that this chapter be read before proceeding to other
chapters.
Online Facilities (on page 58)
A walkthrough guide to using online facilities. Control-M/Analyzer and IOA screens are displayed and
discussed in a logical sequence. This chapter describes the Control-M/Analyzer user interface while
introducing the user to Control-M/Analyzer concepts and terminology.
Control-M/Analyzer Variables (on page 222)
Building on concepts learned in the preceding chapters, the user is introduced to the various types of
variables provided by Control-M/Analyzer. Variables are used to store and access information during data
balancing tasks (rules). Included in this chapter is a detailed discussion of the Control-M/Analyzer
database, which is accessed using the Online facility, and a list of Control-M/Analyzer system variables.
The AutoEdit facility and use of AutoEdit variables are also discussed in this chapter.
Expressions and Functions (on page 269)
Expressions enable the user to perform calculations and data comparisons. Included in this chapter is a
list of built-in functions provided by Control-M/Analyzer.
Rule Definition (on page 348)
Rules can be created by specifying parameters using the Online facility. Detailed information about, and
examples of, each rule definition parameter are provided in this chapter.
Rules can also be created using a standard editor. Detailed information on Control-M/Analyzer rule
language syntax and commands is provided in this chapter.
Mission Definition Parameters (on page 527)
Missions are used to schedule data balancing tasks (rules). Missions are defined and created using the
Online facility. Detailed information about each mission definition parameter is provided in this chapter.
Reconciliation Facility (on page 600)
Data from different sources can be compared and balanced with the Reconciliation facility. Comparisons
can be made across applications and between different generations of the same application.
Report Generation (on page 625)
Describes the types of reports available under Control-M/Analyzer.
12
Rollback Facility (on page 627)
Instructions for restoring the Control-M/Analyzer Database to a previous state are provided in this
chapter.
Control-M/Analyzer Interfaces (on page 632)
Information regarding accessing and interfacing with other INCONTROL products and user programs is
provided in this chapter.
Solveware Samples Kit (on page 643)
Sample rules illustrate Control-M/Analyzer balancing techniques and methods. These rules can help you
implement Control-M/Analyzer quickly and successfully.
A Editing Rule Definitions in the IOA Edit Environment (on page 660)
Explains how to perform line editing commands from within the IOA Edit environment.
B Reserved Words (on page 673)
Lists words that are reserved by Control-M/Analyzer for its own use, and that should not be specified
when naming rules, missions, variables, and so on.
C Calling Control-M/Analyzer User Routines (on page 675)
Provides technical information that describes how user routines are called.
D Euro Support (on page 678)
Enables Control-M/Analyzer rules to validate data before and after implementing Euro currency conversion
in data and/or application software.
E TRACE Facility (on page 687)
Examines Control-M/Analyzer commands while a rule is executing and after its termination.
F Single Startup API (on page 689)
Enables a user program to make multiple calls to a Control-M/Analyzer rule after performing a single
startup of the Control-M/Analyzer Runtime environment.
13
Conventions Used in this Guide
Notational conventions that may be used in this guide are explained below.
Preconfigured PFKeys
Many commands are preconfigured to specific keys or key combinations. This is particularly true with
regard to numbered PF keys, or pairs of numbered PF Keys. For example, the END command is
preconfigured to, and indicated as, PF03/PF15. To execute the END command, press either the PF03 key
or the PF15 key.
Instructions to enter commands may include
only the name of the command, such as, enter the END command
only the PF keys, such as, press PF03/PF15
or both, such as, press PF03/PF15, or enter the END command
14
Names of Commands, Fields, Files, Functions, Jobs, Libraries,
Members, Missions, Options, Parameters, Reports,
Subparameters, and Users
The names of commands, fields, functions, jobs, libraries, members, missions, options, parameters,
reports, subparameters, users, and most files, are shown in standard UPPERCASE font.
User Entries
In situations where you are instructed to enter characters using the keyboard, the specific characters to
be entered are shown in this UPPERCASE BOLD text, for example, type EXITNAME.
Syntax statements
In syntax, the following additional conventions apply:
A vertical bar ( | ) separating items indicates that you must choose one item. In the following
example, you would choose a, b, or c:
a | b | c
An ellipsis ( . . . ) indicates that you can repeat the preceding item or items as many times as
necessary.
Square brackets ( [ ] ) around an item indicate that the item is optional. If square brackets ( [ ] ) are
around a group of items, this indicates that the item is optional, and you may choose to implement
any single item in the group. Square brackets can open ( [ ) and close ( ] ) on the same line of text,
or may begin on one line of text and end, with the choices being stacked, one or more lines later.
Braces ({ }) around a group of items indicates that the item is mandatory, and you must choose to
implement a single item in the group. Braces can open ( { ) and close ( } ) on the same line of text,
or may begin on one line of text and end, with the choices being stacked, one or more lines later.
Screen Characters
All syntax, operating system terms, and literal examples are presented in this
typeface. This includes JCL calls, code examples, control statements, and system messages. Examples
of this are:
15
calls, such as
CALL 'CBLTDLI'
system messages, both stand-alone, such as You are not logged on to database
database_name, and those embedded in text, such as the message You are not logged on to
database database_name, are displayed on the screen.
Variables
Variables are identified with italic text. Examples of this are:
In syntax or message text, such as
Specify database database_name
In regular text, such as
replace database database_name1 with database database_name2 for the current session
In a version number, such as
EXTENDED BUFFER MANAGER for IMS 4.1.xx
Special elements
This guide includes special elements called notes and warnings:
Notes provide additional information about the current subject.
Warnings alert you to situations that can cause problems, such as loss of data, if you do not follow
instructions carefully.
16
Control-M/Restart information is identified in this guide by the §Restart§ symbol, which is shown at the
beginning of the Control-M/Restart information. This symbol is shown using the following guidelines:
If an entire topic level is dedicated to Control-M/Restart material, the heading of that topic begins
with the §Restart§ symbol. Similarly, if there are lower level topics within that level that are also
dedicated to Control-M/Restart material, the headings of those lower level topics will also begin with
the §Restart§ symbol.
This provision also applies to Control-M/Restart paragraphs, each of which will begin with the
§Restart§ symbol, or, on occasion, to single sentences, or even phrases or words, if they exclusively
pertain to Control-M/Restart material.
The same §Restart§ symbol is placed at the conclusion of each unbroken block of text material that
contains Control-M/Restart material, regardless of whether the material spans more than one heading
level, paragraph, or sentence. For example, if a first level Control-M/Restart topic includes second
and/or third and/or fourth and/or fifth level topic headings, with no intervening material that is not
related to Control-M/Restart, the §Restart§ symbol will be placed at the end of the text in the lowest
level sentence of unbroken Control-M/Restart material.
If a figure or table is used exclusively to identify or explain Control-M/Restart material, the following
statement will appear immediately preceding the figure title or the table title:
§Restart§ The following (figure)(table) is for users who have Control-M/Restart installed at their
site.
If Control-M/Restart material is included only in part of a figure or table otherwise used to illustrate
standard Control-M material, the §Restart§ symbol will be used within the figure or table to identify
the information relevant only to Control-M/Restart users.
If Control-M/Restart is not installed at your site, you can skip any material in this guide that is identified
with the §Restart§ symbol.
Related Publications
INCONTROL for z/OS Installation Guide
A step-by-step guide to installing, customizing, maintaining, and upgrading INCONTROL products using
the INCONTROL Customization and Installation Engine (ICE) application.
The guide is divided into the following volumes:
INCONTROL for z/OS Installation Guide: Installing
This guide describes the procedures and steps required for installing INCONTROL products.
The following installation tracks are available:
• express installation
• customized installation
• cloning
INCONTROL for z/OS Installation Guide: Customizing
This guide describes the procedures and steps required for customizing INCONTROL products.
17
INCONTROL for z/OS Installation Guide: Maintaining
This guide describes the procedures and steps required for maintaining INCONTROL products.
The following maintenance procedures are described:
• periodic maintenance
• ad hoc maintenance
• change deployment
INCONTROL for z/OS Installation Guide: Upgrading
This guide contains instructions for upgrading to the current release from previous INCONTROL
versions.
The Express Upgrade is the recommended approach for upgrading INCONTROL products to the most
recent major version.
User Guides
Product-specific guides containing comprehensive information about the operation and implementation of
each INCONTROL product.
18
1
1
Introduction
This chapter includes the following topics:
INCONTROL Products and IOA (on page 20)
• IOA (on page 21)
• INCONTROL (on page 21)
Control-M/Analyzer Capabilities (on page 23)
Data Types (on page 24)
Automated Actions (on page 25)
Unattended Balancing Operations (on page 26)
Extended IOA Capabilities (on page 26)
Control-M/Analyzer Quality Control (on page 26)
• Manual Quality Control of Computer Processes (on page 27)
• Automated Quality Control of Computer Processes With Control-M/Analyzer (on page 27)
How Control-M/Analyzer Works (on page 29)
Methods of Invoking Control-M/Analyzer (on page 30)
Input Data Sources (on page 30)
Control-M/Analyzer Runtime Environment (on page 31)
Balanced Data (on page 32)
Job Flow Under Control-M/Analyzer (on page 32)
Control-M/Analyzer Implementation (on page 33)
• Defining Groups (on page 33)
• Group Concept and Group Modes (on page 33)
• Collecting Information (on page 35)
• Using the Online Facility (on page 35)
• Defining Database Variable Parameters (on page 35)
• Defining Rule Parameters (on page 36)
• Defining Balancing Mission Parameters (on page 39)
• Balancing Mission Definition Screen (on page 40)
Invoking the Control-M/Analyzer Runtime Environment (on page 41)
• General (on page 41)
• Invoking Control-M/Analyzer Directly (on page 42)
19
Control-M/Analyzer User Guide
Control-M/Analyzer Control-B
Control-M/Restart Control-R
Control-M/Tape Control-T
20
Control-M/Analyzer User Guide
IOA
The Integrated Operations Architecture (IOA) is at the heart of the INCONTROL family of products. IOA
has a common core of shared code as the foundation of its architecture design. INCONTROL's IOA
environment has several inherent design advantages, including a common user interface and a shared
data repository. A key feature of the IOA environment is its integrated application design, which includes:
Integrated User Notification
Management by Exception
Integrated Scheduling
Interdependency and Interrelationship Handling
Common Help Facility
Integrated Management Reporting
Common Method for Sharing Information
Unified Installation and Maintenance
Unified Security Implementation
Open Interface Design
INCONTROL
The INCONTROL family of products includes:
Table 2 List of INCONTROL Products
Product Description
21
Control-M/Analyzer User Guide
Product Description
22
Control-M/Analyzer User Guide
Control-M/Analyzer Capabilities
Control-M/Analyzer is a data balancing and quality control system that is designed to do the following:
perform data balancing (examining, checking, verifying information integrity) for applications and
other production processes
automatically react to potential crisis situations before corrupted data is dispersed throughout the
system
reduce the cost of correcting data related problems by detecting and fixing them as soon as possible
provide quality control during job execution, reducing the need for and delay caused by manual
checking
influence an existing job flow based on balancing results
rollback Control-M/Analyzer Database values to an earlier generation if necessary
Control-M/Analyzer can be invoked in the following ways:
by inserting a Control-M/Analyzer step within a job
Several Control-M/Analyzer steps can be inserted within a job. Control-M/Analyzer steps can be
inserted before and after an existing job step, enabling data validation both before and after the
execution of a production step. Input data is validated before a step is executed, and output data is
examined and balanced after a step is executed.
Because Control-M/Analyzer steps can be placed inside a job, Control-M/Analyzer provides monitoring
and intervention at any point in the job. Results of a Control-M/Analyzer step can influence the
execution of subsequent job steps.
directly from an application program
Arguments can be passed from the application program to Control-M/Analyzer (for validation,
balancing, or storage for future use). Control-M/Analyzer can also return values to the application
program, including balancing results.
by another product in the INCONTROL family of products
23
Control-M/Analyzer User Guide
Data Types
Various types of data can be selected, analyzed and balanced. Types of data that may be specified in
Control-M/Analyzer include:
Table 3 Data Types
Data Description
Control-M SYSDATA The three Control-M job sysout data sets (archived by
Control-M/Restart): job log (console messages), expanded
JCL, and system output messages.
24
Control-M/Analyzer User Guide
Automated Actions
Control-M/Analyzer offers a wide range of automated actions that aid in balancing data and in performing
operations as a result of the balancing process. Some of these actions include:
Table 4 Automated Actions
Action Description
Data Search and Search data sources for critical information. Extract data for
Extraction examination and manipulation. Store extracted data for later use.
Database Access Retrieve data from the Control-M/Analyzer Database and store
calculations and data for future reference in the Database.
Cross-reference Database variables and the rules that use them.
Data Reconciliation Reconcile data from different sources. Produce summary records for
large files by data reconciliation.
Formatted Reports Format printed values so that numbers and text are positioned
within an output field according to your specifications.
Rule Processing Control rule processing flow based on conditional criteria – invoke
Control Flow certain statements and skip other statements.
User Notification Issue user notification messages to various destinations upon the
occurrence of specified events.
Issuance of Balancing Issue balancing results in meaningful terminology – OK, TOLER, and
Results NOTOK.
Job Execution Control Issue appropriate codes to discontinue the processing of a job if the
data are not balanced.
Report Control Influence report processing (for example, releasing, deleting, and
changing class or destination) based on balancing results.
Euro Support Enables Control-M/Analyzer rules to validate data before and after
implementing Euro currency conversion in data and application
software.
25
Control-M/Analyzer User Guide
26
Control-M/Analyzer User Guide
27
Control-M/Analyzer User Guide
Control-M/Analyzer data balancing procedures can implement a wide variety of quality control techniques
including:
internal consistency checks
cross-application checks
run-to-run comparisons and trend analysis
statistical evaluations
With Control-M/Analyzer, data balancing need not require changes to program source code. Incorporating
sophisticated quality control techniques in the source code of numerous programs is time-consuming,
expensive and, if your organization does not control the source code, simply impossible.
When problems are detected, Control-M/Analyzer can initiate one or more of the following appropriate
actions:
terminate with a return code that indicates the type of problem
initiate the execution of a job or application
continue or stop subsequent production jobs and reports
send messages to appropriate recipients
open problem tickets
delete a problematic report file from spool
produce a detailed balancing report indicating the number and types of problems found
The Control-M/Analyzer Reconciliation Facility provides a quick and effective way to determine why
control totals do not balance. This facility examines multiple information sources, sorts them, compares
them on the record level, and identifies specific records that do not match. The Reconciliation facility
enables extraction, reformatting, accumulation and comparison of data fields in files. Any field or
combination of fields can be defined as a key for sorting the records prior to comparison.
28
Control-M/Analyzer User Guide
29
Control-M/Analyzer User Guide
Validity Description
OK Valid
NOTOK Invalid
30
Control-M/Analyzer User Guide
Item Description
The data source is examined and processed by the rule. During rule processing, calculations are
performed to determine if the data source is balanced. Information can be stored in variables for future
use, facilitating "run-to-run" and "cross-application" comparisons and checking.
The Runtime environment can be monitored and controlled by the Online Definition, Tracking, and Control
facility as shown in Figure 3. This Online facility enables you to view and control Control-M/Analyzer
Definition libraries, and various files stored in the Control-M/Analyzer Repository, as shown in Figure .3
The tracking screens provided by the Online facility include:
Table 7 Tracking Screens
Screen Description
For each tracking screen, options and commands provide additional control over the displayed
information.
31
Control-M/Analyzer User Guide
Balanced Data
The diamonds in the illustration in Figure 3, in How Control-M/Analyzer Works (on page 29), are tagged
according to the value determined by the machine after the analysis process. Similarly, the Runtime
environment determines which data sources are accurate and valid. Data that successfully complete the
balancing process are called Balanced Data.
Balancing results are returned to the rule and to the production job/application program. Using these
balancing results and the JCL "COND" mechanism, execution of subsequent steps in the job can be
controlled. In this manner, valid data sources continue to be processed in the production environment,
while invalid data sources can be rejected. Rejecting invalid data sources is symbolized by the ejection of
NOTOK diamonds from the machine.
32
Control-M/Analyzer User Guide
Job sysouts, Rule Activity reports, and online tracking screens enable balancing results to be
examined.
The Control-M/Analyzer sysout files shown in Table 8 are created after rule termination.
Table 8 Sysout Files
File Description
Control-M/Analyzer Implementation
This overview provides recommendations regarding preparations for implementing Control-M/Analyzer.
For an in-depth discussion of Control-M/Analyzer implementation, see the INCONTROL for z/OS
Installation Guide, the INCONTROL for z/OS Administrator Guide, and the Control-M/Analyzer Getting
Started and Implementation Guide.
Defining Groups
BMC recommends that you divide the workplace into logical groups and applications (for
example, accounting department, managers). Control-M/Analyzer operates on a group basis, and
balancing tasks can be different for each group. Also, different groups can be implemented using a
"staged implementation" strategy and become fully operational at different times based on Group
Implementation Modes.
33
Control-M/Analyzer User Guide
Feature Description
Control-M/Analyzer Usually, jobs that perform similar functions need access to the
Database variables same type of information. For example, quality control jobs
need to access different Control-M/Analyzer Database
variables than payroll jobs.
Control-M/Analyzer assumes that the Database variable being
referenced belongs to the current group. There is no need to
specify the group name. However, it is possible to define a
rule that accesses Database variables of other groups.
IOA Log file The audit trail in the IOA Log file may be listed by group,
providing a meaningful list of audit trail entries.
34
Control-M/Analyzer User Guide
Collecting Information
After your workplace has been divided into logical groups and applications, relevant examples of the data
sources that need balancing should be collected. Various comparisons and calculations that need to be
performed, and the values that should be stored in the Control-M/Analyzer Database, are listed for future
reference.
35
Control-M/Analyzer User Guide
36
Control-M/Analyzer User Guide
Each Control-M/Analyzer rule is composed of Basic Rule parameters, followed by a series of at least one
block (group) of statements. In Control-M/Analyzer, a block of statements beginning with EXECUTE is
called an EXECUTE block. These blocks are composed of data specifications, rule processing instructions,
and actions that are performed as a result of the rule.
Each EXECUTE block contains one ON statement, which determines the data source to be processed. The
EXECUTE block also contains at least one Automated Balancing statement (DO statement). Conditional
statements, repetitive processing statements, and branching statements determine how the EXECUTE
block is processed.
EXECUTE blocks are invoked sequentially within the rule. Certain blocks may be skipped at the time of
execution based on the resolution of their UPON criteria. Control-M/Analyzer also provides non-sequential
block processing capabilities, such as one block calling another block.
The structure of a sample rule and its EXECUTE blocks is illustrated in free format (not using the actual
syntax Control-M/Analyzer) in Table 10. Explanations of the abbreviations in the fourth column of
Table 10 are shown in Table 11.
For detailed descriptions of Balancing Rule Definition statements and parameters, see Rule Definition (on
page 348).
Table 10 Structure of Sample Control-M/Analyzer Rule
37
Control-M/Analyzer User Guide
Abbreviation Explanation
DO DO statement
38
Control-M/Analyzer User Guide
39
Control-M/Analyzer User Guide
Note: A rule can be invoked without being scheduled by a balancing mission. This is achieved by
specifying a rule name, instead of a mission name, as a parameter to the Control-M/Analyzer job step (B).
Also, one mission (see "Balancing Mission C" in diagram above) can schedule different rules at different
times (for example, daily processing versus month-end processing) using categories.
Basic summary and online screen information regarding both Mission Definition parameters and Rule
Definition parameters is provided in Online Facilities (on page 58). More information about Balancing
Mission Definition parameters is provided in Mission Definition Parameters (on page 527). More
information about Rule Definition parameters is provided in Rule Definition (on page 348).
40
Control-M/Analyzer User Guide
Balancing Mission Definition parameters are stored in libraries (partitioned data sets). For each mission,
one member is created containing one or more categories for that mission. For example, it is sometimes
necessary to invoke the rule differently on a regular day than at the end of the month. The balancing
mission contains scheduling instructions.
An unlimited number of libraries can be defined. For example, in an installation that employs distributed
control, each group of users can have its own library. This allows users to define data balancing missions
without any breach of security.
Although the balancing mission is defined once, it can be updated by authorized users at any time.
41
Control-M/Analyzer User Guide
Method Description
Application program The name of the rule to be invoked is specified by the call of the
application program to Control-M/Analyzer. For additional
information see C Calling Control-M/Analyzer User Routines (on
page 675).
Example:
Call CONTROLB(<rule name>)
Job step The rule to be invoked is specified by the JCL statement of the job
step (in the balancing job). This is the most frequently used
method.
Example:
// EXEC CONTROLB,RULE=rule,GROUP=group,
ARG='arg1,...,argn'
Note: The GROUP specification is mandatory only if the GROUP parameter in the rule
definition was omitted. Otherwise (meaning, the GROUP parameter was specified in the rule
definition), the GROUP specification is optional.
The ARG specification allows up to 50 arguments. See Passing Arguments While Invoking
Control-M/Analyzer (on page 42).
When Control-M/Analyzer starts processing, it searches for the specified rule in the libraries referenced by
the DABRULE DD statement. If the rule is found, it is invoked. If the rule is not found, a runtime error
occurs.
42
Control-M/Analyzer User Guide
43
Control-M/Analyzer User Guide
Method Description
Application program The name of the mission to invoke is specified by a program call to
Control-M/Analyzer in the application program. For additional
information see Appendix C, "Calling Control-M/Analyzer User
Routines,".
Example:
CALL CONTROLB(<mission>,...);
Job step The name of the mission to be invoked is specified in the JCL
statements of the job step (which invokes the Control-M/Analyzer
Runtime Environment).
Example:
// EXEC CONTROLB,MISSION=msn,GROUP=group,
ARG='arg1,...,argn'
Note: The GROUP specification is mandatory only if the GROUP parameter in the rule definition was
omitted. Otherwise (the GROUP parameter was specified in the rule definition), the GROUP specification is
optional. The ARG specification allows up to 50 arguments. For more information, see Passing Arguments
While Invoking Control-M/Analyzer (on page 42).
When the call or step that invokes Control-M/Analyzer is executed, Control-M/Analyzer first checks each
entry in the Active Balancing file to locate the appropriate balancing mission. The Active Balancing file
search method consists of the phases shown in Table 14.
Table 14 Active Balancing Search Phases
Phase Description
Phase 1 All mission entries with corresponding mission names are checked to
see if their runtime scheduling criteria are met. Missions whose
runtime scheduling criteria are met advance to the second phase for
further checking.
Phase 2 Missions that have passed the first phase are checked to see if the
values specified by the JOB and STEP parameters match the job
name and (optional) step name of the current call or step.
Note: The * mask character can be specified at the end of JOB and
STEP names.
The SCOPE parameter of each eligible mission entry in the Active Balancing file is checked to determine a
JOB/STEP match. The SCOPE parameter specifies one of the options shown in Table 15.
44
Control-M/Analyzer User Guide
Option Description
SINGLE If JOB and STEP values match, the mission entry is eligible for
further checking only if it has not been invoked before. The SINGLE
option guarantees that this mission entry is only invoked once, by a
single Control-M/Analyzer invocation.
STEP If JOB and STEP values match, the mission entry is eligible for
further checking if it has not been invoked before, or it was
previously invoked by the current STEP in the current JOB. The
STEP option enables the mission entry to be invoked repeatedly,
provided that the mission entry is invoked from the same job step
each time, for example, from an application program that invokes
Control-M/Analyzer from within a loop.
JOB If the JOB value matches, the mission entry is eligible for further
checking if it has not been invoked before, or it was previously
invoked by the current JOB. The JOB option enables the mission
entry to be invoked by several Control-M/Analyzer invocations,
provided that the invocations all originated from the same job.
ALL The mission entry is always eligible for further checking. The ALL
option enables the mission entry to be invoked regardless of the
JOB and STEP that previously invoked the mission entry.
The first mission that matches the above criteria is selected for execution.
If no matching mission is found, a runtime error occurs.
45
Control-M/Analyzer User Guide
Control-M/Analyzer Components
The main components of Control-M/Analyzer and their interrelationships are discussed in this section. The
described components include
Runtime environment (1)
Rule Definition library (2)
Mission Definition library (3)
Repository (4)
Online Definition, Tracking, and Control facility (5)
New Day procedure (6)
Reporting facility (7)
Utilities (8)
Figure 11 Control-M/Analyzer Main Components
46
Control-M/Analyzer User Guide
Overview
The heart of the Control-M/Analyzer balancing system is the Control-M/Analyzer Runtime environment
(1). The Runtime environment is usually activated by a job step, a subroutine call from an application
program, or a call to Control-M/Analyzer from another INCONTROL product.
The Runtime environment is responsible for the execution of balancing procedures (known as rules and
balancing missions). Rules contain user-defined instructions for balancing and are stored in the Rule
Definition library (2). Missions contain rule scheduling criteria and are stored in the Mission Definition
library (3). Both these libraries are standard partitioned data sets and are user-defined.
When the Runtime environment is activated, the name of the mission or rule that should be invoked is
specified. The Runtime environment then performs the balancing procedures specified by the mission or
rule.
The Repository (4) is accessed by all the components of Control-M/Analyzer. Every action performed by
Control-M/Analyzer is recorded in the Repository. The Repository can be scanned and updated using the
Online Tracking and Control facility (5), which is a full screen, user-friendly interface that can be activated
under TSO, TSO/ISPF, ROSCOE/ETSO, CICS, VTAM, IMS/DC, IDMS/DC, or COMPLETE.
The New Day procedure (6) analyzes the mission scheduling parameters and places missions to be
invoked in the Active Balancing file on a daily basis.
The Reporting facility (7) accesses the Repository to produce various reports that are required in an active
data center.
Control-M/Analyzer Utilities (8) enhance the operation of Control-M/Analyzer by facilitating maintenance,
backup and archiving of the Repository, and by performing other necessary functions. For detailed
information about Control-M/Analyzer utilities, see the INCONTROL for z/OS Utilities Guide.
Repository
The Repository and the IOA Core consist of the files shown in Table 16.
Table 16 IOA Core and Repository Files
The Repository is accessed by all components of Control-M/Analyzer: New Day procedure, Online Tracking
and Control facility, Utilities, and Reporting facility. Multiuser access is synchronized and safely controlled.
47
Control-M/Analyzer User Guide
Control-M/Analyzer Database
The Control-M/Analyzer Database contains information about each Control-M/Analyzer Database variable.
The Database tracks the generations (previous and current values) of each variable. Database variables
are grouped according to logical divisions in the workplace.
Reports File
The Reports file contains the summary report of each invocation of a Control-M/Analyzer rule. It can be
accessed through the Rule Activity file. The Report Viewing screen (option R) displays messages that
appeared during each invocation listed in the Rule Activity display (Screen BA).
48
Control-M/Analyzer User Guide
49
Control-M/Analyzer User Guide
TSO/ISPF IMS/DC
ROSCOE/ETSO IDMS/DC
CICS COM-PLETE
TSO users can activate other online application programs (including ISPF) parallel to the Online facility
under the multiplication environment created by Control-M/Analyzer.
Control-M/Analyzer provides full color support when activated from a screen with extended 7-color
support.
50
Control-M/Analyzer User Guide
Reporting Facility
The following types of reports are available:
reports produced automatically by the operation of Control-M/Analyzer
reports produced using the IOA KeyStroke Language
Control-M/Analyzer special purpose reports
Some Control-M/Analyzer reports are produced from information in the Rule Activity file, Report file, or
IOA Log file. Other reports are produced from the Active Balancing file, mission definition files, and the
Database.
The Reporting facility can be activated at any time. Sample reports are provided in the IOA SAMPLE
library. The Reporting facility is described in Report Generation (on page 625).
51
Control-M/Analyzer User Guide
Utilities
Maintenance, backup and archiving of the Database and other Control-M/Analyzer files can be performed
using Control-M/Analyzer and IOA utilities. Utilities provide greater overall flexibility in the balancing
process. For information about utilities see the INCONTROL for z/OS Utilities Guide.
Typical utility functions include:
deleting unneeded entries from Repository files
recreating Control-M/Analyzer index files
checking the integrity of Control-M/Analyzer files
printing special reports
formatting and maintaining Control-M/Analyzer data and index files
IOA Environment
Control-M/Analyzer can work in conjunction with other INCONTROL products in the Integrated Operations
Architecture (IOA) environment. All INCONTROL products use the same data for scheduling, control, and
audit trail information.
The following features, which have already been discussed in relation to Control-M/Analyzer, are
standardized across the INCONTROL family of products:
IOA Conditions files
Log file
Manual Conditions file
Calendars
Online facility
AutoEdit facility
Reporting facilities
The integration between Control-M/Analyzer and other INCONTROL products involves more than just data
sharing by using the same IOA Core and AutoEdit facility. It involves many aspects of unified scheduling
and control and a common user interface, examples of which can be found throughout this guide.
Control-M and Control-D can invoke Control-M/Analyzer directly, and information can be returned to
Control-M and Control-D after rule termination. These interfaces greatly enhance integration in the IOA
environment. For additional information see Control-M/Analyzer Interfaces (on page 632).
52
Control-M/Analyzer User Guide
A prerequisite condition is a user-defined descriptive name given to a situation, event, or condition. The
data of a job is balanced (checked, verified, examined) only when all prerequisite conditions defined as
necessary for the execution of the rule exist. Prerequisite conditions are either created by previous jobs
(for example, by Control-M, by Control-D missions, by Control-O rules, and by Control-M/Analyzer
missions and rules), or created manually using the Online Tracking and Control facility.
Figure 13 Prerequisite Conditions
53
Control-M/Analyzer User Guide
Condition Description
BALANCING-OK an event
TOTALS-IN-TOL an event
EJ18FOR-FINISHED-OK an event
A list of prerequisite conditions can be specified in the mission definition parameters. Control-M/Analyzer
allows mission execution only if all prerequisite conditions exist.
Prerequisite conditions can be used to create any kind of dependency (for example, mission to mission,
mission to job, manual operations, creation of a data set).
Prerequisite conditions can be added or deleted in the following ways:
specification of statement DO COND in a Control-M/Analyzer rule
use of the Online Tracking and Control facility
through an application program or a job step using a supplied routine or utility
The Online Tracking and Control facility adds conditions like AR-BALANCED or PRINT-SALARY. These
prerequisite conditions represent manual operations. They can be added by any authorized user.
The most common way of adding or deleting a condition is by defining it in rule definition parameters.
Prerequisite conditions are strictly under the user’s control. An unlimited number of conditions, and
therefore an unlimited number of dependencies, can be created. Prerequisite conditions can be used for
any purpose.
54
Control-M/Analyzer User Guide
Regular calendars consist of scheduling dates or days (of the week) that can be defined according to
monthly patterns.
Calendar Examples
Table 19 Regular Calendar Examples
QUARTERLY Schedules rules on the last day of each quarter: March 31, June 30,
Sept. 30, Dec. 31.
Regular calendars are especially useful when many missions have the same schedule. Defining that
schedule once in a calendar, and specifying the name of that calendar in the mission definition of those
missions, makes it unnecessary to individually define that schedule in the mission definition of those
missions.
Periodic calendars are especially useful when scheduling dates do not conform to fixed date/day of the
week/month patterns.
Example
PAYCAL – Schedules missions (for example, payroll) every other Wednesday. Scheduling occurs on the
first, third, and (if there is one) fifth Wednesday of some months. Scheduling occurs on the second and
fourth Wednesday of other months.
The IOA Calendar facility is described in further detail in IOA Calendar Facility (on page 204).
System Date
This date is supplied by the operating system. It should be the actual calendar date starting and ending at
midnight.
Working Date
Many sites do not use midnight as the formal time for changing to a new date. For example, the working
date can start at 6:00 A.M. every morning. The hours between midnight and 6:00 A.M. would therefore
belong to the previous system date.
55
Control-M/Analyzer User Guide
The working date, meaning, the time at which a date changes at the site, is defined in the
Control-M/Analyzer installation parameters. New date processing generally begins at the start of the new
working date.
Gregorian Dates
Gregorian dates are indicated in the guide by the following symbols.
Table 20 Gregorian Date Formats
Symbol Description
mm Month (01-12)
Whether a field holds a 4-character date (month and day), a 6-character date (month, day and 2-digit
year) or an 8-character date (month, day and 4-digit year) depends on the field. However, the format of
the 4-character, 6-character or 8-character date depends on the date standard defined at installation.
INCONTROL products support three date standards for Gregorian dates. Each standard has an 8-character
format, a 6-character format, and a 4-character format. Only one Gregorian date standard is defined at
any site.
56
Control-M/Analyzer User Guide
Julian Dates
Julian dates (also supported by INCONTROL products) are indicated in the guide by the symbols shown in
Table 22.
Table 22 Julian Date Formats
Symbol Description
jjj or ddd Day of the year (001 - 365 or 366, as appropriate for the year)
Julian date fields have either three, five, or seven characters. Whether a Julian date field holds a
3-character date (day of year only), 5-character date (day of year and 2-digit year) or a 7-character date
(day of year and 4-digit year) depends on the field definition. However, the format of the date depends
on the installation-defined date standard.
For example, the Julian date for the calendar date of 28 February 2000 would be represented in jjj or ddd
format as 059, in yyjjj or yyddd format as 00059, and in yyyyjjj or yyyyddd format as 2000059.
57
2
2
Online Facilities
Overview (on page 58)
IOA Features (on page 59)
Database Variable Definition Facility (on page 86)
Rule Definition Facility (on page 107)
Balancing Mission Definition Facility (on page 124)
Balancing Status Facility (on page 145)
Rule Activity Display Facility (on page 157)
Condition and Resource Handling Facility (on page 180)
IOA Log Facility (on page 195)
IOA Calendar Facility (on page 204)
Utilities Under ISPF (on page 219)
Overview
The Online facility is the basic means of communication between the user and Control-M/Analyzer.
Online mission and rule definition gives users the ability to define and modify balancing missions, rule
parameters, and database variables in the Control-M/Analyzer environment.
Online tracking displays the current status of all parameters relating to a specific balancing mission or
rule, a group of balancing missions, or all the balancing missions, scheduled under Control-M/Analyzer.
Control-M/Analyzer also enables the user to view current and past values of Database variables and rule
statuses. Control-M/Analyzer rule invocations are tracked as well.
Online control allows authorized users to modify all parameters relating to a specific mission or rule, a
group of missions or rules, or all the missions and rules scheduled under Control-M/Analyzer, as well as
Database variables.
The following pages describe the main features available under the Online facility.
58
Control-M/Analyzer User Guide
IOA Features
This section discusses the IOA features common to all INCONTROL products.
Customization
IOA screens, constants, messages, colors, commands, and PFKey definitions can be site-modified to adapt
them to local needs.
INCONTROL products can be customized globally, that is, for the whole site, using the INCONTROL
Installation and Customization Engine (ICE), according to profile variables defined during installation.
In addition, INCONTROL products can be customized to respond differently to individual users if these
profile variables are specified in user profile members.
For example, depending on the setting of a variable in a particular user profile member, upon exit from a
screen in which changes have been requested, this INCONTROL product may either perform the
requested changes automatically or display a confirmation window before performing the changes.
Customization issues are discussed in the INCONTROL for z/OS Installation Guide.
Note: Due to customization, the screens and examples illustrated in this guide may differ from the ones
used at your site.
59
Control-M/Analyzer User Guide
Environment Support
The Online facility can be activated under the following environments:
TSO (native)
TSO/ISPF
ROSCOE/ETSO
CICS
VTAM
IMS/DC
IDMS/DC
COM-PLETE
Cross memory interfaces (to the Online monitor) are optional under native TSO, TSO/ISPF, and
ROSCOE/ETSO. They are always used under the other environments.
There are slight differences in the operation of the Online facility under the different environments.
Special notes are provided in this guide where applicable.
Terminal Support
IOA supports the following models of IBM 3270 terminals:
Model 2 – 24 lines, 80 columns
Model 4 – 43 lines, 80 columns
Model 3 – 32 lines, 80 columns
Model 5 – 27 lines, 132 columns
Note: When using the IOA online facility under IMS/DC and IDMS/DC, all model types display 24 lines and
80 columns.
IOA adjusts to the screen size in order to use the maximum available data area on the screen.
60
Control-M/Analyzer User Guide
Color Support
When INCONTROL products are activated from a screen with extended seven-color support, they make
extensive use of the color attributes of the screen. The concept of management by color is emphasized in
INCONTROL screens.
Like all screen attributes, the color attribute for each field is defined externally to the program and can be
locally modified by the site.
Note:
IOA does not automatically recognize IMS/DC and IDMS/DC terminals as supporting extended color
attributes. If your IMS/DC or IDMS/DC terminal supports extended color attributes and you want IOA
to recognize this, refer to the INCONTROL z/OS Administrator Guide for more information.
At this time, IOA does not support extended color attributes under COM-PLETE.
Due to ISPF characteristics, color changes cannot occur in adjacent columns but must be separated
by an attribute byte without color, that is, black. Therefore, some IOA screens have a different
appearance under ISPF than under other online environments, such as native TSO and CICS.
Prefixing
For fields that automatically support prefixing, selection strings are always treated as prefixes. Selection is
made if a segment of the text beginning with the first letter, that is, any prefix, matches the selection
criterion.
Examples
Assume the following names exist: A3, A4, M, M01, M03, M12, M13, M22, M23, M30, M33, M103, M135,
M301.
Table 23 Prefixing Examples
A A3, A4
M M, M01, M03, M12, M13, M22, M23, M30, M33, M103, M135, M301
61
Control-M/Analyzer User Guide
Character Masking
For fields that support masking, mask characters function as follows:
* represents any number of characters, including no characters
? represents any one character
For fields that do not automatically support prefixing, a prefix value can be specified by ending the
selection string with an asterisk.
Examples
Assume the following names exist: A3, M, M3, M01, M03, M13, M23, M33, M103, M435, M2243.
Table 24 Masking Examples
M??3 M103
62
Control-M/Analyzer User Guide
+-----------------------------------------------------------+
| |
| USER ID ===> |
| |
| PASSWORD ===> |
| |
| NEW PASSWORD ===> ===> |
| |
+-----------------------------------------------------------+
Type your user ID and password and press Enter. If you enter a correct user ID and password, the IOA
Primary Option menu is displayed.
The IOA Online facility allows three attempts to enter a valid user ID and password combination. After the
third unsuccessful attempt, the program is terminated.
To change a password, type the new password twice, once in the NEW PASSWORD field and once in the
confirmation field.
63
Control-M/Analyzer User Guide
To select an option, type the option number or letters in the OPTION field and press Enter. Alternatively,
for a number option, press the PFKey of the same number. For example, to select the LOG option, press
PF05/PF17.
Note: Your INCONTROL administrator can limit the options displayed on a user-by-user basis and can
alter option numbers and customize option descriptions. Product supplied options are discussed in this
guide.
Certain IOA commands, functions, and facilities (options) are shared by all INCONTROL products. These
shared IOA commands, functions and facilities are described later in this chapter, and outlined in
Table 25.
64
Control-M/Analyzer User Guide
INFO INFO Display a window in the IOA Primary Option Menu. The
window contains information about installed
INCONTROL products. For more details on the
information displayed by this command, see IOA
Version Information (on page 69).
Note: Entering =1 in the command line of any other screen returns you to the IOA Primary Option Menu
that is displayed at your site.
These shared functions and facilities are described in further detail in this chapter.
The functions and facilities (options) described in Table 26 are applicable to Control-M/Analyzer.
65
Control-M/Analyzer User Guide
The IOA Primary Option menu illustrated in Figure 16 is displayed at sites supporting all currently
available INCONTROL products (under ISPF).
Note: Option OK (KOA Recorder facility) is available only under IOATSO, and not under IOAISPF or
IOAMON.
Figure 16 IOA Primary Option Menu when all INCONTROL Products are Installed
--------------------- IOA PRIMARY OPTION MENU ------------------(1)
OPTION ===> USER N06
Note: Entering =1 in the command line of any other screen returns you to the IOA Primary Option Menu
that is displayed at your site.
For a description of the options for other INCONTROL products, see the user guides of the respective
products.
Additional options available on the IOA Primary Option menu when operating Control-M/Analyzer with
other INCONTROL products are listed in Table 27.
66
Control-M/Analyzer User Guide
Note: Option IV is available only at sites where Control-O or CMEM are installed.
Note: Options 2, 3, and C are available only at sites where Control-M is installed.
67
Control-M/Analyzer User Guide
Note: Options OR, OM, OS, OL, OA, OV, OC, and OK are available only at sites where
Control-O is installed.
Note: Options TR, TP, TV, TI, and TC are available only at sites where Control-M/Tape is
installed.
68
Control-M/Analyzer User Guide
Multi-Screen Control
It is not necessary to return to the IOA Primary Option menu to move from one online facility to another.
To speed up transfer of control between screens of different facilities and to enable you to manage
several online facilities at the same time, transfer control commands can be specified. Transfer commands
take you directly from your current screen to the requested screen. Transfer commands can be used to
reach any screen that can be accessed by the IOA Primary Option menu at your site.
Each transfer control command consists of an equal sign immediately followed by one of the options of
the IOA Primary Option menu, which represents the target screen of the transfer. For example, from any
screen, enter:
69
Control-M/Analyzer User Guide
Command Description
If you use a transfer command to reach another screen, the state of the current screen remains
unchanged when you return to it using another transfer command.
The INCONTROL administrator can globally deactivate any or all of the transfer commands.
70
Control-M/Analyzer User Guide
Screen Layout
Most IOA screens are divided into the four basic areas described in Table 29. The example illustrated in
Figure 18 is the IOA Log screen.
Table 29 Basic IOA Screen Areas
Screen Description This line at the top of the screen describes the purpose of the
and Message Line screen (in the example screen, the "IOA Log.") A screen identifier
may appear in the upper right corner (in the example screen, 5).
This line is also used to display messages.
Screen Header and This area is used for online commands, and, where applicable,
Command Area headings of the screen data.
Data Area On some screens, the data area can be scrolled. For more
information, see Scrolling Commands (on page 74).
Screen Bottom This area of the screen usually contains a list of available commands
or options (In the example screen, SHOW, GROUP, CATEGORY, and
SHPF), or a brief explanation about screen usage. The current time
is displayed in the lower right corner.
71
Control-M/Analyzer User Guide
PFKey Description
PF01/PF13 HELP
PF24 SHPF
72
Control-M/Analyzer User Guide
To see the PFKey assignment of the screen with which you are working, type the reserved command
SHPF in the command line and press Enter. A window describing the current PFKey assignment appears
on the screen. Press Enter again to close the window.
Figure 19 PFKey Assignment Window
FILTER: ---------------- IOA LOG -------------------------------(5)
COMMAND ===> SCROLL===> CRSR
SHOW LIMIT ON ==> DATE 291201 - 010102
DATE TIME ODATE USERID CODE ------ M E S S A G E --------------------
311201 184915 311201 K48 SUB13AI JOB K48RUN1 / OID=005W9 SUBMITTER STARTED
PROCESSING JOB ON SYSTEM: OS35
311201 184915 311201 K48 SUB133I JOB K48RUN1 K48RUN /27255 OID=005W9
SUBMITTED FROM LIBRARY (P) K48.LIB.JOB
311201 184918 311201 K48 SPY28GI JOB K48RUN1 K48RUN /27255 OID=005W9 TAPE
DRIVE UNITS USED=00 00
311201 184918 311201 K48 SPY281I JOB K48RUN1 K48RUN /27255 OID=005W9 START
+----------------------------------------------------------------------------+
| |
| ENTER ENTER PF13 HELP |
| PF01 HELP PF14 SHOW |
| PF02 SHOW PF15 END |
| PF03 END PF16 RESET |
| PF04 RESET PF17 FIND |
| PF05 FIND PF18 =6 |
| PF06 =6 PF19 UP |
| PF07 UP PF20 DOWN |
| PF08 DOWN PF24 SHPF |
| PF12 RETRIEVE |
+----------------------------------------------------------------------------+
If you type text in the COMMAND field and press a PFKey, the text in the COMMAND field is treated as a
subparameter of the command assigned to the PFKey.
Two additional key definitions are:
Table 31 Additional Key Assignments
Key Description
PA2 Under native TSO and ROSCOE, the first time you press this key,
the screen is refreshed. The second consecutive time, a copy of the
screen is sent to be printed, or to a file, using DD statement
PRTDBG. For terminal models supporting PA3, the PA3 key is
defined in exactly the same way as PA2.
When the IOA online facility is activated as an ISPF application, PA2
is controlled by ISPF, and only refreshes the screen. To print the
screen, see IOA Under ISPF (on page 78). Under other online
environments, such as CICS and VTAM, PA2 serves as a refresh
only. Usually one of the PA keys is assigned a local print function.
For information on changing IOA PFKey definitions, see the appendix in the INCONTROL for z/OS
Administrator Guide that deals with modifying IOA Online facility commands.
73
Control-M/Analyzer User Guide
Scrolling Commands
Scrolling conventions are very similar to the ISPF conventions of IBM. Two basic commands are used for
scrolling:
Table 32 Scrolling Commands
The commands can be specified by typing directly in the COMMAND field or by pressing the predefined
PFKey.
The scrolling amount is determined by the content of the SCROLL field in the right corner of the screen
header. Valid scrolling amounts:
Table 33 Scrolling Amounts in the SCROLL Field
CRSR Scroll by cursor position. If the cursor is outside the data area, a full
page is scrolled.
MAX Scroll maximum available (for example, UP MAX will scroll to the
top).
It is only necessary to type the first letter of the new amount in the SCROLL field in order to change the
scrolling amount.
A scrolling amount other than that shown in the SCROLL field can be used by specifying the amount
directly after the scroll command itself, or by specifying the scroll amount in the COMMAND field and
pressing the appropriate scrolling PFKey. The scrolling amount in the SCROLL field remains unchanged.
Example
If PAGE is the value in the SCROLL field, to scroll to the bottom, type M (MAX) in the COMMAND field and
press PF08/PF20 (DOWN).
74
Control-M/Analyzer User Guide
LOCATE Command
The LOCATE command, and its abbreviation, L, can be used to search for items in the NAME field in all
"directory type" screens that contain scrollable data, such as the Calendar List screen. The syntax of the
command is
LOCATE string
where string is the search string. Apostrophes (‘single quotes’) or quotation marks ("double quotes") are
not required.
The search proceeds from the top of the list to the first item in the list that starts with the specified string.
The cursor is positioned on the OPTION field at the beginning of the line containing the string, if found, or
on the OPTION field of the alphabetically closest preceding value if the specified value is not found.
FIND Command
The FIND command, and its abbreviation, F, can be used in all screens that contain scrollable data to find
and display the next occurrence of a character string. The syntax of the command is
FIND string [fromcol] [tocol] [PREV]
where
string is the search string
Mandatory.
fromcol is the first column in the search range
Optional.
tocol is the last column in the search range
Optional.
PREV is the indicator that the search must move backward, instead of forward, from the current
cursor position
Optional.
General Rules
If the string contains blanks, enclose the string with apostrophes (‘single quotes’) or quotation marks
("double quotes"). For example:
FIND 'WAIT SCHEDULE'
The column range searched can be limited by entering fromcol or tocol values, or by entering both
fromcol and tocol values.
The search for the string proceeds from the current cursor position forward, or backward if PREV is
entered. If the string is found, the cursor is positioned at the start of the string.
To repeat the find, to the next or previous occurrence of the string, press PF05/PF17.
Note: The following situations outline where the FIND command can, or should, be further modified to
enhance its functionality.
75
Control-M/Analyzer User Guide
Some screens enable the user to limit the number of lines searched by a FIND command. This is
discussed in the relevant screen descriptions.
In some screens, the FIND command does not detect information that is to the right or left of the
information displayed in the monitor. To ensure detection of the desired string, the screen must be
displayed in wraparound mode, when available, before executing the FIND command.
Text String Searches
The FIND command can also be used to search for text strings, in which case the command will find all
instances of the string, regardless of whether the characters within the string are lowercase, uppercase,
or mixed case. To search for a text string, include the letter T immediately before a quoted string.
For example,
FIND T'WAIT SCHEDULE'
will find WAIT SCHEDULE, and it will also find wait schedule, and Wait Schedule, and any other case
variant.
Text string searches are the default. If your system default is for text strings, You do not need to include
the T if you perform a text string search. Your INCONTROL administrator can change the default to
character string. In this case you do not need to include the C if you perform a character string search.
Character String Searches
The FIND command can be used to search for character strings, in which case the command will find all
instances of the string, but only where the string contains characters that match the case specified. To
search for a character string, include the letter C immediately before a quoted string.
For example,
FIND C'WAIT SCHEDULE'
will find WAIT SCHEDULE, but it will not find wait schedule, or Wait Schedule, or any other case variant.
76
Control-M/Analyzer User Guide
Online Help
The following types of online help are available for INCONTROL screens:
Screen Help
Provides information about the entire screen. This help is available on all INCONTROL screens and is
accessed by pressing the HELP key (PF01/PF13) while the cursor is positioned on the COMMAND field in
the screen.
Line-Sensitive Help
Provides information about the fields on a particular line on a screen. This help is available on several
INCONTROL screens. It is accessed by pressing the HELP key (PF01/PF13) while the cursor is positioned
on the desired line of the screen.
Figure 20 IOA Help Screen
------------------------------ IOA HELP SCREEN --------------------- (CTMHDT2 )
COMMAND ===> SCROLL===> CRSR
If line-sensitive help is not supported in a screen, pressing the HELP key (PF01/PF13) from anywhere in
the screen displays the beginning of the Help panel.
Help can be scrolled using standard scrolling conventions.
To return to the original screen, use the END command (PF03/PF15).
The Help member name appears on the right in the Help screen header. Members containing the Help
descriptions can be found in the IOA MSG library.
77
Control-M/Analyzer User Guide
AutoRefresh Mode
Certain INCONTROL screens, as noted in this chapter where appropriate, support AutoRefresh mode. A
screen display in AutoRefresh mode is automatically updated periodically with the most current data.
AutoRefresh mode can only be activated under native TSO or under ISPF. AutoRefresh mode is activated
by the AUTO command. The format of the command is
AUTO n
Command PFkey
SPLIT (usually PF02/PF14)
SWAP (usually PF09/PF21)
The rest of the PFKeys are controlled by IOA PFKey definitions, which are in the IOA PARM library.
It is possible to assign TSO/ISPF commands such as PRINT to PFKeys, or to change PFKey definitions by
performing the following steps:
78
Control-M/Analyzer User Guide
IOA Editor
The IOA Editor enables you to edit members of a partitioned data set (PDS) using an editor similar to the
ISPF editor. Enter EDMEM in the command line of any screen to display the Edit Entry Panel window, as
illustrated in Figure 21.
Figure 21 IOA Editor Edit Entry Panel
Figure 21 IOA Editor Edit Entry Panel
--------------------- IOA PRIMARY OPTION MENU ------------------(1)
OPTION ===> USER N06
To create a new member or edit an existing member, fill in the LIBRARY and MEMBER parameters and
press Enter. The IOA Editor screen is opened for editing, as illustrated in Figure 22.
79
Control-M/Analyzer User Guide
Note: If the member already exists in the specified library, the member is displayed for editing in the IOA
Editor. Similarly, if you accessed the IOA Editor screen from line option J in either screen 2 or screen 3,
the member in the library referred to in the schedule definition member will be displayed for editing.
Figure 22 IOA Editor
---------------------------- I O A E D I T O R ------------------- (EDMEM)
COMMAND ===> SCROLL===> CRSR
ROW PROD.V610.DEMO(TEST) COL 001 072
......
......
......
......
......
......
......
......
......
......
************************ B O T T O M O F D A T A **************************
80
Control-M/Analyzer User Guide
PFKeys Description
PF03/PF15 Terminates the editing session. If the edited member has been
changed the member will be saved automatically.
Command Description
SAVE Saves all new data without terminating the edit session.
Table 37 describes editing commands that can be executed by entering the command in the leftmost
position of the applicable row.
81
Control-M/Analyzer User Guide
Command Description
82
Control-M/Analyzer User Guide
Command Description
The process of setting TRACE levels and turning off a particular TRACE, and the process of setting
language preferences for online screens and messages, begins in the SET Command Panel.
Using the SET Command Panel to set and end TRACE Levels
Setting the TRACE level can help you monitor certain IOA Online facility and INCONTROL functions, such
as security checks.
The following steps explain how to set or turn off a TRACE level:
1. Type a TRACE level number, from 1 through 256, in the TRACE level field of the SET Command
Panel.
2. In the (Trace level 1-256, ON or OFF) field, type ON to set a TRACE level, or OFF to turn off a TRACE
level.
3. Press Enter to confirm the setting, in which case the following message is displayed:
CTMA2AI TRACE LEVEL nnn WAS SET xxx
83
Control-M/Analyzer User Guide
where
• nnn is the TRACE level number
• xxx indicates whether the TRACE level was set ON or turned OFF
Note: TRACE level settings take effect immediately.
84
Control-M/Analyzer User Guide
Note: CLISTs cannot be activated from the TSO screen. To activate a CLIST, first activate ISPF and then
execute the CLIST under ISPF.
TSO commands can also be activated directly from any IOA online screen by typing TSO in the COMMAND
field.
Transfer of Control Between the TSO Application and the IOA Online
Facility
You can return to the IOA Online facility from the TSO application by simply exiting the TSO application in
a normal manner. However, this method can be time consuming and inconvenient if an ISPF application
or a similar TSO application is activated.
If the TSO application can issue a TSO command, it is possible to transfer control to the IOA Online
facility, and vice versa, without exiting the TSO application.
While working under the TSO application, for example, under ISPF, issue the command:
TSO CTMTTRA {n | =n}
85
Control-M/Analyzer User Guide
The requested screen is displayed as it was when you transferred from it.
To return to the TSO application, use the =6 command (PF06/PF18). The application remains in the
same state as when you transferred from it.
BMC recommends that you simplify transfer between screens by permanently assigning one of your
PFKeys under ISPF (or SDSF, and so on) to the command TSO CTMTTRA. Once this key assignment is
made, you no longer need to type the full transfer command. Instead, you merely type the IOA option
number or code in the COMMAND field and press the assigned PFKey. You are transferred to the desired
screen.
Note: You must activate ISPF under the IOA Online facility if you want to use the control transfer feature.
86
Control-M/Analyzer User Guide
Entry Panel
Figure 25 Database Variable Facility Entry Panel
------- Control-M/Analyzer DATABASE FACILITY - ENTRY PANEL --------------(BV)
COMMAND ===>
To display the list of groups in a library: Type the library name and press Enter.
To display the list of variables of a specific group: Type the library name, type the group name and
press Enter. If the group name does not exist, the screen for defining a new group is displayed.
To display the details of a specific variable: Type the group name, type the variable name, and press
Enter. If the variable for the specified group does not exist, the screen for defining a new variable in
the group is displayed.
Note: If you enter the screen for defining a new variable and want to leave it without defining a variable,
use the RESET command or press PF04/PF16.
When specifying group and variable names in the entry panel, mask character * is supported.
87
Control-M/Analyzer User Guide
Examples
Table 38 Group and Variable Names – Mask Character Examples
Note: A mask character can be used in the specification of a variable name only if the group name is
specified without a mask character.
Use the scrolling PFKeys to scroll the Group List forward (PF07/PF19) and backward (PF08/PF20).
A short description is displayed for each group. This description can be specified either when creating a
new group, or through Option U – the Update option. For more information, see Options of the Group List
Screen (on page 89).
88
Control-M/Analyzer User Guide
The implementation level – mode – of the group is also displayed. The mode can be specified either when
creating a new group, or through Option U – the Update option. For more information, see Options of the
Group List Screen (on page 89). The following three modes are provided by Control-M/Analyzer:
Define mode
Simulate mode
Active mode
For additional information on implementation levels, see Group Concept and Group Modes (on page 33).
Option Description
I (INSERT) Insert a new group in the list. The New Group window appears,
prompting you to specify the group name, description, and mode.
See "Inserting a New Group" below.
The new group is added after the group marked "I". When the
Group List screen is redisplayed, the groups are listed in
alphabetical order.
U (UPDATE) Update the description of the current group. For more information,
see Updating Group Descriptions and Modes (on page 91).
89
Control-M/Analyzer User Guide
Enter the group name, group description, and group mode in their respective fields. You must enter Y
(Yes) or N (No) in the CREATE field. Press Enter to return to the Group List screen.
The new group is listed after the group marked "I". The next time the Group List screen is displayed, the
list is alphabetized.
90
Control-M/Analyzer User Guide
Modify the group description and/or the group mode in their respective fields. You must enter Y (Yes) or
N (No) in the UPDATE field. Press Enter to return to the Group List screen.
91
Control-M/Analyzer User Guide
92
Control-M/Analyzer User Guide
Option Description
S (SELECT) Edit details of the specific Database variable. The Database Variable
Definition screen appears.
I (INSERT) Insert a new variable in the list. The Database Variable Definition
screen appears, with the same details as the variable marked "I",
but the VARIABLE and DESCRIPTION parameters are empty for you
to fill in.
The new Database variable is initially added after the variable
marked "I". When the Variable List is redisplayed, the variables are
listed in alphabetical order.
V (VIEW) Details of the values of the specific Database variable. The Variable
Display screen appears.
G (GRAPH) Display the View Graph by Variable Generations screen. The screen
lists each generation of a variable with its value and provides a
histogram that graphically illustrates numeric values.
93
Control-M/Analyzer User Guide
94
Control-M/Analyzer User Guide
Basic Parameters
Basic parameters provide basic information about Database variables.
Figure 31 Basic Parameters
+-----------------------------------------------------------------------------+
NAME TOTAL_ONHAND GROUP ACCT_INV
CREATED 04/04/00 - 10:00:00 BY M43 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ON HAND QUANTITY FOR ACCOUNTING
===========================================================================
Parameter Description
CREATED... Date, time, creator, and type of the variable. The BY subparameter
(the creator of the variable) is determined by Control-M/Analyzer and
BY...TYPE
is for display only. The TYPE subparameter contains the type of
activity that created the variable. Valid TYPE values are:
O – Variable created by the online facility.
B – Variable created by batch (see Automatic Database Variable
Creation (on page 235)).
95
Control-M/Analyzer User Guide
Generation Parameters
Generation parameters provide information regarding the number of historical values Control-M/Analyzer
stores for a specified Database variable.
Figure 32 Generation Parameters
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0010 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0005
OLDEST -4 DATE 11/11/97
LATEST 0 DATE 06/06/00
===========================================================================
Parameter Description
OLDEST... DATE Generation and creation date of the oldest generation (value) of this
variable. For display only.
LATEST... DATE Generation and creation date of the newest generation (value) of this
variable. For display only.
96
Control-M/Analyzer User Guide
Validation Parameters
Database variable definition specifications will be provided by Validation parameters in future versions.
Figure 33 Validation Parameters
===========================================================================
TYPE VAR
MASK
Parameter Description
Command Description
END Keep the changes made to the parameters of the variable and return
to the Variable List screen. Automatic Syntax Checking is performed.
For more information, see Saving a Database Variable Definition (on
page 98).
CANCEL or RESET Do not keep the changes made to the parameters of the variable and
return to the Variable List screen. For more information, see Canceling
Changes (on page 98).
97
Control-M/Analyzer User Guide
Enter Y (Yes) or N (No) in one of the exit options (SAVE or CREATE). It is possible to change the name of
the variable in the confirmation window. You then return to the Variable List screen.
Canceling Changes
If you do not want to save the variable definition, press RESET (PF04/PF16) from the Database
Variable Definition screen or RESET from the Exit Option window. As a result, you then return to the
Variable List screen. The Database variable parameters are not saved.
98
Control-M/Analyzer User Guide
99
Control-M/Analyzer User Guide
Displayed Information
The name of the Group to which the variable belongs and the name of the variable are displayed in the
screen header.
Table 45 shows the information that is displayed for each generation:
Table 45 View Graph by Variable Generations Screen Information
Field Description
Graphic value The lines in the graph form a histogram indicating the value of each
generation. The line is replaced by a character string for character
variables.
The variables are displayed in chronological order by generation number. Auto Refresh mode is available
under this screen.
Commands
The View Graph by Variable Generations screen has two commands:
Table 46 Commands of the View Graph by Variable Generations Screens
Command Description
100
Control-M/Analyzer User Guide
where x is the identifying letter for the desired type. DISPLAY can be abbreviated DI.
Example
DISPLAY A
Field Description
GROUP NAME Group name of the variable. For more information, see GROUP Basic
Parameters (on page 240).
VARIABLE NAME Variable name. For more information, see NAME Basic Parameters (on
page 239).
101
Control-M/Analyzer User Guide
Field Description
GROUP NAME Group name of the variable (see GROUP Database variable
parameter).
VARIABLE NAME Variable name (see the NAME Database variable parameter).
102
Control-M/Analyzer User Guide
Field Description
GROUP NAME Group name of the variable (see the GROUP Database variable
parameter).
VARIABLE NAME Variable name (see the NAME Database variable parameter).
103
Control-M/Analyzer User Guide
Field Description
Field Description
GROUP NAME Group name of the variable (see the GROUP Database variable
parameter).
VARIABLE NAME Variable name (see the NAME Database variable parameter).
104
Control-M/Analyzer User Guide
Field Description
User Type Type of activity that created or changed this generation of the
variable (for example, B=Batch, O=Online).
Variable The 3-digit length of the current value of the variable is followed by
a blank and the current value (content) of the variable. The value of
the variable can be changed online. The length of the value of the
variable is adjusted automatically.
The bolded fields in Figure 40 are displayed when option A (additional information) is specified:
Figure 40 Variable Display Type A (All Fields) – Additional Information (Option A)
-------<A>-------- GROUP INTRAC VAR INVAMT02 -------(BV.V)
COMMAND ===> SCROLL===> CRSR
O GROUP NAME VARIABLE NAME GENERATION
INTRAC INVAMT02 000
User Key: Cycle Id:
Creation Date 12/29/99 18:54:46 Creating User M66 User Type B
Variable: 010 679025.520
105
Control-M/Analyzer User Guide
Table 51 Fields of the Variable Display Type A (All Fields) – Additional Information
(Option A)
Field Description
Date Date and time the variable was rolled back or updated.
User User ID of the user who rolled back or updated the variable.
User Type Type of activity that created or changed this generation of the
variable (for example, B=Batch, O=Online).
Option Description
106
Control-M/Analyzer User Guide
Rule Definition
Rule parameters under Control-M/Analyzer are stored in libraries (partitioned data sets). Each member of
the library contains one rule and balancing criteria related to a specific topic. Although most sites
designate a primary rule definition library, the number of permitted rule definition libraries is unlimited.
Note: The number of rules (members) in a library and the size of each rule are all calculated dynamically
and are not dependent on parameter specification.
Screen Description
Rule Definition Facility Allows specification of parameters that determine which screen is
entry panel displayed.
Rule List screen Displays the list of rules in the selected table.
Rule Definition screen Displays the parameters of the selected rule definition. This is the
main screen of the facility.
To enter the Rule Definition facility, select Option BR on the IOA Primary Option menu. The Rule
Definition entry panel is displayed.
107
Control-M/Analyzer User Guide
Entry Panel
Figure 41 Rule Definition Facility – Entry Panel
------------------- CONTROL-M/ANALYZER RULE DEFINITION - ENTRY PANEL -----------(BR)
COMMAND ===>
Note: If you use the selection list fields, their values are not erased until you exit the entry panel by
pressing END (PF03/PF15).
To display the list of rules in a library, do the following:
1. Type the library name.
2. Leave the rule name blank or type part of the rule name using mask characters (* and ?).
3. Press Enter.
108
Control-M/Analyzer User Guide
To scroll down the Table list, press PF08/PF20. To scroll up the Table list, press PF07/PF19.
To return to the entry panel, press END (PF03/PF15).
Option Description
S (SELECT) Display the Rule Definition screen with details of the specific rule.
Note: If the S (Select) option is specified in the Rule List screen for
a rule that is currently in use (selected) by another user, then the
Rule Definition screen is not displayed and the Rule List screen
remains displayed (the default), or the rule definition is displayed in
Browse mode (if a User Profile definition overrides the default). In
either case, an appropriate message is displayed.
109
Control-M/Analyzer User Guide
Option Description
B (BROWSE) Display rules for browsing. Only one rule may be selected at a time.
Note: If the Rule List screen is displayed in Browse mode, options
D (Delete), I (Insert) and N (New) are not available.
D (DELETE) Delete a rule (member) from the Rule List. Multiple rules may be
selected.
I (INSERT) Copy an existing rule definition into a newly created list. The Rule
Definition screen appears, with the same details as the rule marked
"I", but the RULE parameter is empty for you to fill in. The new rule
is added to the list in alphabetical order.
N (NEW) Insert a new rule in the list. An empty Rule Definition screen is
displayed for you to fill in. The new rule is added to the list in
alphabetical order.
Deleting Rules
To delete rules, type D in the OPT field to the left of the rule names and press Enter.
The confirmation window illustrated in Figure 43 is displayed, in sequence, for each rule selected for
deletion:
Figure 43 Rule Definition Facility Delete Rule Confirmation Window
LIST OF RULES IN CTB.PROD.RULES -------------(BR)
COMMAND ===> SCROLL===> CRSR
OPT NAME ------------ VV.MM CREATED CHANGED SIZE INIT MOD ID
ARSETVAR 01.14 98/09/10 00/04/04 08:46 31 18 0 M66
ARWARN01 +--------------------------+ 4 34 0 M27A
ARWARN02 | CONFIRM DELETE OPTION | 4 46 0 M66
D ARWARN03 <-----------| (Y/N) | 4 46 0 M66
ARWARN04 +--------------------------+ 2 17 0 M55A
ARWARN05 01.11 98/09/10 00/06/06 14:40 78 49 0 M66
ARWARN06 01.14 98/08/05 99/11/18 14:24 97 46 0 M66
ARWARN4A 01.15 98/09/03 99/12/29 19:44 122 17 0 M55A
ARWARN4B 01.09 98/11/26 99/12/29 15:42 24 24 0 M32A
ARWARN4C 01.01 98/12/08 00/02/08 10:55 7 7 0 M32A
RULAE 01.12 98/06/16 99/12/23 14:16 32 20 0 M55A
RULALL 01.11 98/09/10 99/12/23 14:34 213 100 0 M55A
RULBLL 01.10 98/07/22 00/08/08 14:34 30 26 0 M55A
RULCALLB 01.04 98/06/15 00/10/10 14:35 24 21 0 M55A
RULCALLR 01.08 98/06/15 00/10/10 14:35 19 16 0 M55A
RULCDM 01.13 98/07/09 00/10/10 14:36 18 16 0 M55A
RULCLASS 01.12 98/06/10 00/08/08 14:38 16 14 0 M55A
RULCOMIT 01.14 98/06/10 00/06/06 14:38 16 20 0 M55A
RULCOND 01.10 98/07/09 00/08/08 14:38 13 8 0 M55A
RULCTM 01.00 99/11/19 99/12/29 15:22 14 14 0 M18
OPTIONS: S SELECT B BROWSE D DELETE I INSERT N NEW 18.10.29
110
Control-M/Analyzer User Guide
111
Control-M/Analyzer User Guide
112
Control-M/Analyzer User Guide
===========================================================================
Parameter Description
Note: If the OWNER or GROUP parameter is specified in the mission definition, it overrides
the corresponding parameter in the rule definition specified here.
UPDATED... BY Date and time of last update... last user to update the rule.
113
Control-M/Analyzer User Guide
Selection Parameters
Selection parameters determine the data source type the rule should examine and balance. These
parameters also control which EXECUTE blocks within a rule are processed.
Figure 46 Selection Parameters
EXECUTE CHECK1 UPON C
ON FILE FILENAME INVENT
MODE PG LINECT 0060 DATASTAMP
Parameter Description
EXECUTE Specifies the name for the EXECUTE block. The name should be unique
within the rule.
Note: SYSDATA is an IOA term used to refer to the following three job
sysout data sets: job log (console messages), expanded JCL, and system
output messages.
114
Control-M/Analyzer User Guide
LABEL:
IF CURR_ONHAND>=MIN_CHR001 C
DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
DO
ELSE
DO PRINT = REORDER; DEFICIT=%%DIFFER F C
DO
(ENTER "ALWAYS", "IF")
Parameter Description
STOP Yes/No flag that indicates if STOP criteria are to be specified. The
format of STOP criteria subparameters is identical to that of WHEN
subparameters.
115
Control-M/Analyzer User Guide
DO BLOCK – Processes another EXECUTE block within the current rule (as long as the EXECUTE criteria
of the called block are met).
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO BLOCK = NEXTBLOC ARG C
DO
DO COMMIT – Determines the method by which Database variables are committed (written) to the
Database.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO COMMIT = ALL VAR C
DO
116
Control-M/Analyzer User Guide
DO EXIT – Immediately terminates the current block. Control passes to the statement that called the
block, if there is one.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = END OF DATA
DO EXIT
DO
DO EXTRACT – Available when ON DATA is not specified. Assigns a value to a variable. The value is
extracted from the current data source.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO EXTRACT = CURR_ONHAND
LEVEL 0 LINE +000 COL +050 - +060 PROCESS TYP
DO
DO GETMEM – Reads (accesses) an AutoEdit member, enabling the use of its AutoEdit symbols for
AutoEdit substitution and variable setting.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO GETMEM = CHRSYM
LIBSYM CTB.PROD.SYMBOLS
DO
DO GOTO – Processes the IF or ALWAYS parameter in the current ON DATA block whose label matches
the specified LABEL name.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO GOTO LABEL NEXTLOOP
DO
DO PRINT – Prints the specified data string to the Control-M/Analyzer default output DD statement and
to the Control-M/Analyzer Rule Activity report.
LABEL:
IF CURR_ONHAND>=MIN_CHR001 C
DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
DO
DO PRINT
DO PUTMEM – Writes a member back to the library for future use by Control-M/Analyzer or other
INCONTROL products.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO PUTMEM = CHRMEM
LIBSYM CTB.PROD.SYMBOLS
DO
DO REMARK – Adds a user-defined remark to the Rule Activity report, which summarizes the
Control-M/Analyzer invocation.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO REMARK = RULE CALCULATIONS HAVE BEEN COMPUTED SUCCESSFULLY
DO
117
Control-M/Analyzer User Guide
DO SHOUT – Sends a message to a specified destination when the identifying string in the WHEN
statement is found.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO SHOUT TO TSO-M43 URGENCY R
= INVENTORY MUST BE REORDERED AT 17:00
DO
DO TERMINAT – Requests rule termination and determines the status of the rule by defining termination
codes. The rule is terminated after this statement.
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
DO TERMINAT = TOLER COD 0001
DO
118
Control-M/Analyzer User Guide
Specifying Comments
Comments are free text descriptions of rule definition parameters that are stored in a rule definition
member. BMC recommends that comments be inserted within rule definitions for clarification and
documentation. Comments are not processed during rule execution.
To insert a comment, position the cursor at the line before which the comment should be inserted and
press CMNT (PF04/PF16). A comment line is opened beginning with the symbol /*. To insert additional
lines, fill in the current line and press Enter.
Note: Comments can also be inserted by typing the CMNT command in the COMMAND field, moving the
cursor to the line before which the comment should be inserted, and pressing Enter.
The Rule Definition screen illustrated in Figure 48 illustrates comment usage:
Figure 48 Illustration of Rule Definition Comment Usage
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP ACCT_INV
UPDATED 07/07/00 - 15:25:54 BY M43
DESC REORDER INVENTORY ITEM CHR001 IF NECESSARY
OPTIONS
===========================================================================
/* INITIALIZATION OF THE MINIMUM AMOUNT REQUIRED ON-HAND FOR
/* INVENTORY ITEM CHR001.
EXECUTE SETUP UPON C
ON DATA
ALWAYS
DO SET = MIN_CHR001=100 C
DO
(ENTER "ALWAYS", "IF")
===========================================================================
/* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
/* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
PLEASE FILL IN RULE DEFINITION. 08.47.46
119
Control-M/Analyzer User Guide
A 2-character line editing command field, marked by underscores, is displayed for each line on the Rule
Definition screen. Editing commands are typed directly onto these underscores.
Incorrectly specified line editing commands can be corrected by typing over them correctly. Line editing
commands can be deleted by blanking them out or by specifying the RESET command in the COMMAND
field.
Specified line editing commands are processed when Enter is pressed.
For additional information about and examples, see A Editing Rule Definitions in the IOA Edit
Environment (on page 660).
120
Control-M/Analyzer User Guide
Command Description
EDIT The EDIT command alternately enters and exits the Edit
environment of the Rule Definition screen. The Edit environment
provides ISPF-like line editing commands for the Rule Definition
screen. For more information see A Editing Rule Definitions in the
IOA Edit Environment (on page 660).
CMNT The CMNT command (PF04/PF16) inserts comment lines after the
current line. To insert a comment, type CMNT in the COMMAND
field, position the cursor on the line before which comments should
be inserted, and press Enter. For more information see Specifying
Comments (on page 119).
LABEL The LABEL command alternately displays and hides the (empty)
labels of ALWAYS and IF subparameters. These labels are used as
rule processing flow reference points by statement DO GOTO.
121
Control-M/Analyzer User Guide
Screen Description
Rule Definition screen How you exit this screen depends on whether changes made in the
Rule Definition screen should be saved. For more information, see
Exiting the Rule Definition Screen (on page 122).
Rule List screen How you exit this screen depends on whether changes made to
each rule should be saved. For more information, see Exiting the
Rule Definition Screen (on page 122).
Command Description
END Keep the changes made to the parameters of the rule and return to
the Rule list. Automatic syntax checking is performed. For more
information, see Saving a Rule Definition (on page 123).
CANCEL Do not keep the changes made to the parameters of the rule and
return to the Rule list. For more information, see Canceling Changes
(on page 123).
122
Control-M/Analyzer User Guide
You must enter Y (Yes) or N (No) in one of the exit options (SAVE or CREATE). You can change the name
of the library or the name of the rule in the window. You then return to the entry panel.
Canceling Changes
If you do not want to save the rule definition, press RESET from the Rule Definition screen or press
RESET from within the Exit Option window. As a result, you return to the Rule List screen and the rule
parameters are not saved.
123
Control-M/Analyzer User Guide
Screen Description
Mission List screen Displays the list of missions in the specified library.
Category List screen Displays the list of mission definitions in a specific job table.
Mission Definition Displays the parameters of the selected mission definition. This
screen screen is used to define, display and modify mission definition
parameters.
To enter the Balancing Mission Definition facility, select Option BM on the IOA Primary Option menu and
press Enter. The entry panel is displayed.
Creating Members
Members can be created in any of the following ways:
By specifying the new mission name in the entry panel and pressing Enter.
By using the SELECT command (described later) to specify the new mission name in the Mission List
screen and pressing Enter.
As a result of using either of the above methods, a skeletal mission definition (meaning, one with most
fields left blank) is displayed in the Mission Definition screen.
Fill in the blanks and save the screen entries. The mission is created with the specified mission definition.
The mission definition is the first and only definition in the Category List for the mission. As additional
mission definitions are created in the mission (described below), they are added to the Category list.
124
Control-M/Analyzer User Guide
Note: Upon exiting the Category List screen, if changes were made in at least one mission definition, and
Exit Option window is displayed. One field of the window displays the mission name. This value can be
changed to a new mission name that creates a new mission in which the mission definitions are saved.
125
Control-M/Analyzer User Guide
Saving Modifications
All changes made to a mission and its mission definitions are kept in memory until the mission is exited.
Upon exiting the mission, the user can choose to save or cancel the changes. For more information, see
Exiting the Mission Definition Screen (on page 140).
Entry Panel
Figure 52 Control-M/Analyzer Mission Definition – Entry Panel
---------- CONTROL-M/ANALYZER MISSION DEFINITION - ENTRY PANEL-------------(BM)
COMMAND ===>
Note: If you use the selection list fields, their values are not erased until you exit the entry panel by
pressing END (PF03/PF15).
126
Control-M/Analyzer User Guide
To open the desired display, fill in Entry Panel fields LIBRARY, MISSION, and CATEGORY as described
below. Type Y (Yes) or N (No) in the SHOW DOCUMENTATION field to display or hide mission
documentation. Type Y (Yes) or N (No) in the AUTO-SAVE DOCUMENTATION field to auto-save
documentation changes. For more information on the SHOW DOCUMENTATION and AUTO-SAVE
DOCUMENTATION parameters, refer to Mission Documentation (on page 138).
To display the list of missions in a library, do the following:
1. Type the library name.
2. Leave the mission name blank or type part of the mission name using mask characters (* and ?).
3. Press Enter.
To display the list of mission definitions for a specific mission, do the following:
4. Type the library name.
5. Type the mission name.
6. Press Enter.
If the mission does not exist, the screen for defining a mission is displayed.
To display the details of a specific mission definition for a specific mission (Mission Definition screen),
do the following:
7. Type the library name.
8. Type the mission name.
9. Type the category name.
10. Press Enter.
If the mission does not exist, or the mission definition for the specified mission does not exist, the screen
for defining a new mission definition in the mission is displayed.
Note: If you enter the screen for defining a new mission definition and want to leave the screen without
defining a mission definition, use the CANCEL command.
To display the Search Window (described below), do the following:
11. Type the library name.
12. Type the mission definition (category) name.
13. Leave the mission name blank or type the mission name using mask characters (* and ?).
14. Press Enter.
To create a new mission: Specify the new mission name and press Enter. The Mission Definition screen,
for defining the first mission definition in the new mission, is displayed.
127
Control-M/Analyzer User Guide
Search Window
The Search window allows the user to search for the specified mission definitions in missions in the
specified library. Missions in which the mission definition have been found are then displayed in the
Mission List screen.
Figure 53 Control-M/Analyzer Mission Definition – Search Window
---------- CONTROL-M/ANALYZER MISSION DEFINITION - ENTRY PANEL -------------(BM)
COMMAND ===>
To close the Search Window without performing any action, press END (PF03/PF15).
To perform a search, select one of the following choices and press Enter:
3 - UNCONDITIONAL SEARCH
This performs an uninterrupted search of all tables in the specified library.
The search is stopped immediately when you select Option 1.
2 - ASK AGAIN AFTER number MEMBERS
This searches the specified number of members in the specified library, and then pauses. The search
number can be modified. Default:10.
Continue the search by pressing Enter.
Stop the search by selecting Option 1 (Stop Search Immediately).
If any members are found, the Mission List is displayed listing those members.
During the search, the following information is displayed at the bottom of the window:
128
Control-M/Analyzer User Guide
Number of members in library – lists the total number of members in the specified library.
Number of searched members – lists the cumulative number of members searched. For example, if
you perform three searches with a specified number of 10, the figure displayed is 30.
Number of selected members – lists the cumulative number of members selected that contain the
mission definition being searched.
If any members are selected during the search, the Mission List is displayed listing those members. If no
members are selected, the Search Window is closed and a message is displayed.
129
Control-M/Analyzer User Guide
Option Description
Deleting Missions
To delete missions, type D in the OPT field to the left of the mission names and press Enter.
The confirmation window illustrated in Figure 55 is displayed, in sequence, for each mission selected for
deletion.
Figure 55 Mission Definition Facility – Delete Screen
MISSION LIST IN CTB.PROD.BALMIS ------------(BM)
COMMAND ===> SCROLL ===> CRSR
OPT NAME ------ VV.MM CREATED CHANGED SIZE INIT MOD ID
ACCT +--------------------------+ 16 0 M17
ADMIN | CONFIRM DELETE OPTION | 7 0 M17
D BACKUP <-----------| Y (Y/N) | 23 0 M27A
GRAPHIX +--------------------------+ 9 0 M66
INVENTRY 01.01 98/07/27 00/01/12 15:34 8 8 0 M27A
MAINT 01.01 98/07/27 00/01/12 15:34 16 16 0 M27
D MARKET 01.01 98/07/27 00/01/12 15:34 8 8 0 M47A
PROF306 01.01 98/07/27 00/01/12 15:34 22 22 0 M25A
D YEAR END 01.05.98/07/08 00/01/18 14:30 8 8 0 M43A
====== >>>>>>>>>>>>>>>> NO MORE MISSIONS IN LIBRARY <<<<<<<<<<<<<< =====
130
Control-M/Analyzer User Guide
For each mission deleted, a message is written to the IOA Log file.
The category description appears to the right of the category name. Use the scrolling conventions to scroll
the Category list forward and backward.
131
Control-M/Analyzer User Guide
Command Description
Option Description
S (SELECT) Display the Mission Definition screen, with details of the specific
category.
Note: If the Category List screen is not displayed in Browse mode,
the balancing mission definition can be edited and updated. If the
Category List screen is displayed in Browse mode, the balancing
mission definition can be browsed, but it cannot be modified.
132
Control-M/Analyzer User Guide
Option Description
D (DELETE) Delete a category from the Category list. When exiting the Category
List screen, a confirmation window is displayed before the category
is deleted.
I (INSERT) Insert a new category in the list. The Mission Definition screen
appears, with the same details as the category marked "I", but the
CATEGORY and DESCRIPTION parameters are empty for you to fill
in. The new category is added after the category marked "I".
133
Control-M/Analyzer User Guide
134
Control-M/Analyzer User Guide
===========================================================================
Parameter Description
SCOPE Extent to which a mission can be executed, for example, only once,
several times by a single job step, several times by the same job, or
many times by any jobs.
Note: If you specify the OWNER or GROUP parameter here in the mission definition, you
will override the corresponding parameter in the rule definition.
135
Control-M/Analyzer User Guide
Parameter Description
DAYS Days of the month to activate this mission. A maximum of two lines
can be specified.
DCAL – DAYS calendar specification.
AND/OR – Conjunctional parameter that links parameters DAYS
and WDAYS.
– A (AND) Both DAYS and WDAYS criteria must be met in
order for a mission to be activated.
– O (OR) Either DAYS or WDAYS criteria must be met in
order for a mission to be activated. Default.
WDAYS Days of the week to activate the mission. A maximum of two lines
may be specified.
WCAL – WDAYS calendar specification.
136
Control-M/Analyzer User Guide
Parameter Description
PDS Name of partitioned data set (library) to be checked for free space.
137
Control-M/Analyzer User Guide
Parameter Description
NOT LATER THAN Time by which the mission is activated even if prerequisite
conditions do not exist.
Parameter Description
Mission Documentation
Displaying Documentation
Depending on the value of the SHOW DOCUMENTATION field in the Mission Definition entry panel,
mission documentation (DOC lines) is either displayed or hidden when you first enter the Mission
Definition screen, as follows:
If the SHOW DOCUMENTATION field is set to Y, mission documentation is displayed upon entry to the
Mission Definition screen.
138
Control-M/Analyzer User Guide
If the SHOW DOCUMENTATION field is set to N, documentation is hidden upon entry to the Mission
Definition screen.
DOC Command
The DOC command alternately displays and hides the documentation of the mission.
Below is an example of the Mission Definition screen with documentation (DOC lines) displayed.
Figure 61 Mission Definition Screen with Documentation (DOC) Lines Displayed
-- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTRY ------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTRY
JOB M43G0 STEP STEP01 , CTB01 SCOPE JOB
RULENAME REORDER RULELIB CTB.PROD.RULES
OWNER M43A GROUP ACCT_INV
DESC SCHEDULES REORDER RULE DAILY
DOCMEM INVENTRY DOCLIB PROD.CTB.DOC
===========================================================================
DOC THIS SCREEN SHOWS WHERE MISSION DOCUMENTATION APPEARS ON THE SCREEN
DOC WHEN YOU USE THE DOC COMMAND.
DOC AS YOU CAN SEE, THE LINES FOLLOWING THE DOCUMENTATION ARE "PUSHED"
DOC DOWNWARD. ENTER THE DOC COMMAND AGAIN TO MAKE THIS MISSION
DOC DOCUMENTATION AREA DISAPPEAR.
DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 15.04.55
Note: If you have DOCU/TEXT installed at your site you may specify a DOCU/TEXT library and member
with up to 132 characters per line. However, if more than the first seven characters in a line are used, the
line is truncated and Browse mode is forced. Browse mode may also be forced if a line has an unprintable
character.
Editing Documentation
Documentation may be edited when the DOC lines of the Mission Definition screen are displayed. Modify
the DOC lines as desired. When you fill in the last DOC line and press Enter, a new DOC line is displayed.
When modifying DOC lines, text must be left in at least one DOC line in order to save the modifications.
Changes resulting in an empty DOCMEM member are not saved.
Mission documentation is written to the library member specified in the DOCMEM and DOCLIB fields on
the Mission Definition screen. Therefore, it is also possible to edit the documentation directly through ISPF
edit of the member. This is recommended when documentation is lengthy or the editing required is very
complex.
Note: For LIBRARIAN and PANVALET users, the DOC command displays or hides mission documentation
in Browse mode. Changes to the documentation are not permitted.
AutoSave and Saving Documentation
Documentation changes can be saved upon exiting the Mission Definition screen. When there are
documentation changes, a Save Documentation window may be displayed depending on the value of the
AUTO-SAVE DOCUMENTATION field in the entry panel:
139
Control-M/Analyzer User Guide
If AUTO-SAVE DOCUMENTATION is set to Y, documentation changes are automatically saved and the
Save Documentation window is not displayed.
If AUTO-SAVE DOCUMENTATION is set to N, documentation changes are not automatically saved and the
Save Documentation window is displayed. This window lets you save or cancel the documentation
changes.
The parameters described in Table 70 can be specified in the Save Documentation window.
Table 70 Save Documentation Window Parameters
Parameter Description
Modify the LIBRARY and MEMBER values if desired, and specify Y (Yes) or N (No) in the SAVE
DOCUMENTATION field; then press Enter.
If there are no documentation changes, the Save Documentation window is not displayed.
140
Control-M/Analyzer User Guide
Command Description
END Keep the changes made to the parameters of the category of the
mission and return to the Category List screen. Automatic syntax
checking is performed. See Saving a Balancing Mission Definition
(on page 142).
CANCEL Do not keep the changes made to the parameters of the category of
the mission and return to the Category List screen. See Canceling
Changes (on page 142).
NEXTCTG Keep the changes made to the parameters of the category of the
mission and display the next category in the Category list.
PREV+++++++CTG Keep the changes made to the parameters of the category of the
mission and display the previous category in the Category list.
Note: Changes made to the parameters are only kept in memory. They are written to the disk after you
exit the Category List screen.
141
Control-M/Analyzer User Guide
You must enter Y (Yes) or N (No) in one of the exit options. It is possible to change the name of the
library or the name of the mission in the window. You then return to the Mission List screen or to the
entry panel, depending on where you were when you entered the Category List screen.
The changes made to the balancing parameters of one category of a mission can be saved only by saving
all the categories of that mission using the Exit Option window.
Canceling Changes
If you do not want to save mission definition changes, specify the CANCEL command in the Mission
Definition screen, or specify the CANCEL command in the Category List screen, or specify the RESET
command in the Exit Option window. As a result, you return to the Category list and the changes are not
saved.
142
Control-M/Analyzer User Guide
Option Description
O (ORDER) Schedule the categories of the mission only if the specified date is
defined as a scheduling date in the Basic Scheduling parameters of
the category.
When you use the O and F options, the confirmation window illustrated in Figure 64 is opened.
Figure 64 Order and Force Confirmation Window
MISSION LIST IN CTB.PROD.BALMIS -------------(BM)
COMMAND ===> SCROLL ===> CRSR
OPT NAME ---------------------------------------------------------------------
ACCT
ADMIN
BACKUP +-------------------------------+
GRAPHIX | CONFIRM ODATE 030399 |
O INVENTRY <-----------| ASK FOR EACH ONE Y |
MAINT +-------------------------------+
MARKET
PROF306
YEAREND
====== >>>>>>>>>>>>>>>> NO MORE MISSIONS IN LIBRARY <<<<<<<<<<<<<< =====
You can change the specified date. To affirm your selection, enter Y in the CONFIRM field. If you decide
not to order the mission or category, enter N (for CANCEL). You then return to the original screen.
If you specify many O or F options in a screen, it may be tedious to affirm each one. To skip the
Confirmation window, type N in the ASK FOR EACH ONE field and press Enter. All the missions or
categories marked O or F are ordered without individual confirmation.
Each mission that is successfully scheduled (ordered) is displayed on the screen illustrated in Figure 65.
143
Control-M/Analyzer User Guide
Press the END command (PF03/PF15) to return to the Mission or Category List screen.
The window contains the fields described in Table 73. Some fields contain default values that can be
modified.
144
Control-M/Analyzer User Guide
Table 73 Files in the Window for Copying Mission Definitions to Another Member
Field Description
LIBRARY Library containing the table into which the balancing mission
definitions should be copied. Must be an existing library. Default is
the current library.
MISSION Name of the mission into which the balancing mission definition
should be copied.
145
Control-M/Analyzer User Guide
On color terminals, rules with different statuses are displayed with different colors. The indicated colors
have been defined as defaults for the rule statuses described in Table 74 (discussed inStatus (on page
153)).
Note: See your INCONTROL administrator to change color definitions.
Table 74 Color Defaults for Rule Statuses
Colors Description
Turquoise Rules that ended TOLER (meaning, within tolerance, the range of
permissible deviation).
Pink Rules that require special user action (for example, Held, Deleted).
146
Control-M/Analyzer User Guide
Pressing RESET (PF10/PF22) in the Show Option window restores the previous criteria and closes the
window.
Note: The selection criteria below marked with the symbol P act on a prefix basis. For example, a show
limit on JOBNAME D4 results in the retrieval of all jobs whose names start with D4.
Available selection criteria are described in Table 75.
147
Control-M/Analyzer User Guide
Criterion Description
RULEP Show only rules of the specified names. A maximum of five rule
names can be specified.
JOBNAMEP Show only rules of the specified job names. A maximum of five job
names can be specified.
MISSIONP Show only rules of the specified mission names. A maximum of five
mission names can be specified.
CATEGORYP Show only rules of the specified category names. A maximum of two
category names can be specified.
GROUPP Show only rules of the specified groups. A maximum of four groups
can be specified.
Job Status Select only rules that conform to the status selection criteria. Set
the wanted statuses to Y and the unwanted statuses to N. Status
selection criteria:
IN PROCESS – If set to Y, rules that are not yet finished are
displayed in accordance with "wait activation" and balancing
criteria. If set to N, in process rules are not displayed.
WAIT ACTIVATION – Rules waiting to be activated.
BALANCING – Rules that are balancing (currently active).
ENDED – If set to Y, finished rules are displayed in accordance
with the ENDED OK, ENDED NOTOK and ENDED TOLER criteria.
If set to N, finished rules are not displayed.
ENDED OK – Rules that ended OK.
ENDED NOTOK – Rules that ended NOTOK.
ENDED TOLER – Rules that ended within tolerance.
STATE – If set to Y, rules that have a status are displayed in
accordance with the HELD, DELETED and FREED criteria. If set
to N, rules that have a status are not displayed.
HELD – Rules in HELD state.
DELETED – Rules that were deleted.
148
Control-M/Analyzer User Guide
Criterion Description
SCOPE Show only wanted rules that conform to the scope selection criteria.
Set the wanted scopes to Y and the unwanted scopes to N. Scope
selection criteria:
SNG – Rules with a scope of SINGLE (rules that can be
activated once).
STP – Rules with a scope of STEP (rules that can be activated
several times for a job step).
JOB – Rules with a scope of JOB (rules that can be activated
several times for a job).
ALL – Rules with a scope of ALL (rules that can be activated
several times for any jobs).
UNS – Unscheduled rules that were activated directly without
being scheduled by a mission.
CONDH – Show only rules that have the specified prerequisite
condition in the IN parameter. A maximum of 2 prerequisite
conditions can be specified.
N N Show no rules.
OWNERH Show only rules of the specified owner. A maximum of five owners
can be specified.
149
Control-M/Analyzer User Guide
Command Description
GROUP The GROUP command alternately displays and hides the group of
each rule. Specify the command in the COMMAND field and press
Enter.
MISSION The MISSION command alternately displays and hides the mission
of each rule. Specify the command in the COMMAND field and press
Enter.
DESC The DESC command alternately displays and hides the description
of each rule. Specify the command in the COMMAND field and press
Enter.
In this command format, x is the identifying letter for the desired type. DISPLAY can be abbreviated DI.
Example
DISPLAY U
150
Control-M/Analyzer User Guide
Field Description
151
Control-M/Analyzer User Guide
Field Description
JOB STEPNAME Step name of the job that invoked the rule.
152
Control-M/Analyzer User Guide
Field Description
PROC STEPNAME Step name of the procedure that invoked the rule.
Status Field
The Status field displays information regarding the current status of the rule. The information in the
Status field consists of a rule state prefix and the status (as described below).
State Description
DELETED Rule has been deleted by an authorized user. Only prefix DELETED
is displayed (meaning, no other information appears in the Status
field).
Status
Table 80 Rule State Statuses
Status Description
153
Control-M/Analyzer User Guide
Balancing Line
If the status of the rule is BALANCING, information about rule invocations that are currently being
balanced is displayed in the following format:
xxxxxxxx yyy
In this format
xxxxxxxx is the name of the most recent invocation in the Active Balancing file of the same rule that
is currently running.
yyy is the number of invocations of the same rule that are currently running.
Code
If the status of the rule is ENDED OK, ENDED NOTOK, or ENDED TOLER, the condition code is displayed:
CODE=nnnn
In this statement, nnnn is a 4-digit number representing the condition code of the terminated rule.
Suffix
A suffix is displayed for rules that have been invoked more than once. The suffix displays information
about the most recent invocation of the same rule that has already ended. Information is displayed in the
following format:
LAST INV (jobname | jobid | jstep) ENDED OK | NOTOK | TOLER CODE=code
In this statement
jobname is the Job name.
jobid is the Job ID.
jstep is the Job step.
code is the 4-digit number representing the condition code of the terminated rule.
154
Control-M/Analyzer User Guide
Sum Line
The sum line is displayed for rules that have been invoked more than once. The sum line displays the
number of rule invocations, how many ENDED OK, how many ENDED NOTOK, and how many ENDED
TOLER. Information is displayed in the following format:
RUNS-wwww, OK-xxx, NOTOK-yyy, TOLER-zzz
In this statement
wwww is a 4-digit number representing the total number of invocations of the rule.
xxx is a 3-digit number representing the number of invocations that ended OK.
yyy is a 3-digit number representing the number of invocations that ended NOTOK.
zzz is a 3-digit number representing the number of invocations that ended TOLER.
Note: Additional information can be displayed by issuing the DESC, GROUP, CATEGORY, and MISSION
commands. This information is displayed after the entire Status field (including its prefixes and suffixes).
For additional information about these commands see Format Commands of the Active Balancing
Environment Screen (on page 150).
Option Description
? (WHY) Display the Why screen (described immediately below) showing the
reasons for the Wait Activation Status.
LOG Display the IOA Log screen (described in IOA Log Screen (on page
195)) showing all Log messages for the specified rule.
155
Control-M/Analyzer User Guide
Why Screen
The Why screen, which is illustrated in Figure 71, is displayed when the ? (WHY) option is entered on the
Active Balancing Environment screen. The Why screen shows the reasons a rule has Wait Activation
status.
Figure 71 Active Balancing Environment Why Screen
---------------------------- INVENTORY IS WAITING FOR: -------------------(BB.?)
COMMAND ===> SCROLL===> CRSR
Use the scrolling conventions to scroll the Why screen forward and backward.
To return to the Active Balancing Environment screen, press END (PF03/PF15).
Possible WHY reasons are described in Table 82.
Table 82 Possible WHY Reasons
Reason Description
TIME LIMIT FROM hhmm The rule can only be executed during the indicated time
UNTIL hhmm range.
COND condition-name A prerequisite condition required by the rule (along with its
ODATE mmdd original scheduling date) does not exist.
156
Control-M/Analyzer User Guide
Usage of the Rule Log screen is explained in detail in IOA Log Screen (on page 195).
Note: The IOA Log screen can be accessed by typing =5 in the command field and pressing Enter.
The Show Screen Filter window can be opened in the Rule Log screen to create or modify a filter. For
information on how to use the SHOW command (PF02/PF14) see IOA Log Show Screen Window (on
page 199).
To return to the Active Balancing Environment screen, press END (PF03/PF15).
157
Control-M/Analyzer User Guide
SELECT BY:
GROUP ===> * Group name or * for all groups
USERID ===> Userid name or prefix
JOBNAME ===> Job name or prefix
STEPNAME(S) ===> Step name(s)
REMARK ===> Remark or prefix
RULE ===> Rule name
CATEGORY ===> Site-defined category or mask
DATE FROM ===> TO Job date
TIME FROM ===> TO Job time
SELECT BY STATUS:
OK ===> Y
Not OK ===> Y
In tolerance ===> Y
DISPLAY OPTIONS:
Bypass panel ===> N
Display type ===> D
158
Control-M/Analyzer User Guide
Field Description
STEPNAME(S) Job step names. A maximum of two job steps can be specified.
DATE FROM/TO Earliest and latest activity date. Date criteria are matched against
the following dates:
ODATE (Original scheduling date).
Invocation start date.
Dates can be specified as follows:
mmddyy or ddmmyy format, depending on the site standard.
–n, where n is the number of preceding days (any value from 0
through 365). Example: –3 means three days ago.
A FROM date expressed without a TO date implies that the FROM
and TO date are the same.
The Rule Activity entry panel retains the value specified in this field
when exiting and reentering the entry panel or Rule Activity Display
screen.
Example:
DATE FROM –2 TO 0
If today is Thursday, invocations are included from Tuesday,
Wednesday, and Thursday. If today is Friday, invocations are
included from Wednesday, Thursday, and Friday.
159
Control-M/Analyzer User Guide
Field Description
TIME FROM/TO Earliest and latest rule processing time of day. Time format is
hhmm. Time criteria are matched against:
Rule invocation start time
Rule invocation end time
If TIME FROM is "later" than TIME TO, time is calculated from the
FROM time until midnight and from midnight until the TO time (for
example, from 1000 to 0800 means anytime except between 8:00
a.m. and 10:00 a.m.).
SELECT BY STATUS
Only invocations that meet selected invocation status criteria are displayed:
Table 84 SELECT BY STATUS Selection Criteria
Field Description
OK Invocations that have terminated and have met all data balancing
specifications.
Intolerance Invocations that did not meet data balancing specifications but did
terminate within user-defined tolerance levels.
160
Control-M/Analyzer User Guide
DISPLAY OPTIONS
Table 85 Display Options
Option Description
Bypass panel This parameter determines whether the Rule Activity entry panel is
displayed the next time you enter the Rule Activity facility. Valid
values are:
Y – Bypass the Rule Activity entry panel and enter the Rule
Activity display directly (using the last set of values entered).
N – Display the Rule Activity entry panel the next time you
enter the Rule Activity facility.
Display type Specifies the desired display type (or format) of the Rule Activity
display. Valid values are:
A – All Fields
U – User – for end users
D – Default – for operations personnel
Examples of these types are provided later in this chapter. Additional display types can be defined. See
the discussion about display types in the INCONTROL for z/OS Installation Guide.
161
Control-M/Analyzer User Guide
Header Line
The Rule Activity display has a header line at the top of the screen indicating the main selection criteria
values that were specified.
Table 86 Rule Activity Display Header Line
Field Description
In this command, x is the identifying letter for the desired type. DISPLAY can be abbreviated DI.
Example
DISPLAY U
162
Control-M/Analyzer User Guide
Field Description
STEPNAME Job step (including program and procedure names) that invoked the
mission or rule.
GROUP Group name of the mission or rule. For more information, see
"GROUP" in Table 78 in Display Type A (All Fields) (on page 151).
Note: If the GROUP or OWNER parameter is specified in the mission definition, it overrides
the corresponding parameter, if any, in the rule definition.
163
Control-M/Analyzer User Guide
Field Description
164
Control-M/Analyzer User Guide
Field Description
STEPNAME Job step (including program and procedure names) that invoked the
mission or rule.
165
Control-M/Analyzer User Guide
Field Description
166
Control-M/Analyzer User Guide
Result Description
By typing Y (Yes) in one or more of the SELECT BY STATUS fields in the Rule Activity entry panel, it is
possible to view only those invocations that ended with the specified statuses.
167
Control-M/Analyzer User Guide
Command Description
DISPLAY While in a Rule Activity display, you can change the display type by
using the DISPLAY command. The format of the command is:
DISPLAY x
where x is the identifying letter for the desired type. DISPLAY may
be abbreviated DI.
Example
DISPLAY U
displays the User type of the Rule Activity display.
168
Control-M/Analyzer User Guide
Option Description
V (VIEW) View the variables created and accessed by the rule (described
earlier in Database Facility – Variable List (on page 92)). Variables
cannot be modified or deleted under this option.
L (LOG) View the IOA Log file entries created by the invocation (described in
IOA Log Facility (on page 195)).
REPORT View the Rule Activity report created by the invocation. This option
can be applied to invocations with a Report field specification of Y.
When this option is selected, the Control-M/Analyzer Rule Activity
Report screen is displayed. Messages that appeared during the
Control-M/Analyzer invocation are listed. For additional information
see Rule Activity Report Viewing Screen (on page 176).
ROLL BACK Restore the Control-M/Analyzer Database to its state before the
invocation ran. For additional information see Rollback Confirmation
Window (on page 177) and Rollback Facility (on page 627).
PRINT Prints the Rule Activity report created by the invocation on the
printer or to a data set. This option can be applied to invocations
with a Report field specification of Y. When this option is selected,
the Print Option window is opened. For additional information see
Print Option Window (on page 178).
169
Control-M/Analyzer User Guide
Use the scrolling conventions to scroll the View Graph by Group screen forward and backward. To refresh
the screen, type REFRESH in the COMMAND field of the screen and press Enter, or press PF04/PF16.
To return to the Active Balancing Environment screen, press END (PF03/PF15).
The View Graph by Group screen has two formats: one for color terminals and one for non-color
terminals. They are discussed below.
170
Control-M/Analyzer User Guide
The screen header contains three status totals (ENDED NOTOK, ENDED TOLER and ENDED OK) for all
rules in the Active Balancing file. For details of these totals, see Table 93.
Table 93 View Graph By Group Screen Status Totals
Status Description
ENDED NOTOK Total number of rules with ended NOTOK status (red)
ENDED TOLER Total number of rules with ended TOLER status (yellow)
171
Control-M/Analyzer User Guide
Field Description
RULE STATUS The lines in the graph indicate the number of rules in each status
for each group.
Rule Graph
In the rule graph, rule statuses are differentiated by color, as described in Table 95.
Table 95 Rule Status Colors
Color Description
Green ENDED OK
For each group in the graph, the number of columns of a particular color depends on the number of rules
having that status and the scale of the graph.
A scale line facilitates reading the number of rules of each status for a group. The scale used
(meaning, the number of rules represented by each column) is automatically adjusted based on the
number of rules in the group containing the most rules.
Commands
The View Graph by Group screen has the commands described in Table 96.
Table 96 Commands of the View Graph By Group Screen
Command Description
172
Control-M/Analyzer User Guide
The screen header contains three status totals (ENDED NOTOK, ENDED TOLER and ENDED OK) for all
rules in the Active Balancing file:
Table 97 View Graph By Group Screen Status Totals
Status Description
ENDED NOTOK Total number of rules with ended NOTOK status (*)
ENDED TOLER Total number of rules with ended TOLER status (+)
173
Control-M/Analyzer User Guide
Field Description
RULE STATUS The lines in the graph indicate the number of rules in each status
for each group.
Rule Graph
In the rule graph, rule statuses are differentiated by symbols, as described in Table 99.
Table 99 Rule Status Symbols
Symbol Description
* ENDED NOTOK
+ ENDED TOLER
% ENDED OK
For each group in the graph, the number of columns containing a particular symbol depends on the
number of rules having that status and the scale of the graph.
A scale line facilitates reading the number of rules of each status for a group. The scale used
(meaning, the number of rules represented by each column) is automatically adjusted based on the
number of rules in the group containing the most rules.
Commands
The View Graph by Group screen has two commands:
Table 100 Commands of the View Graph by Group Screen
Command Description
174
Control-M/Analyzer User Guide
Note: The IOA Log screen can be accessed by typing =5 in the command field and pressing Enter.
The Show Screen Filter window can be opened in the Rule Log screen to create or modify a filter. For
information on how to use the SHOW command (PF02/PF14) see IOA Log Show Screen Window (on
page 199) .
To return to the Rule Activity display, press END (PF03/PF15).
175
Control-M/Analyzer User Guide
***---------------------------------------------------------------***
*** GROUP : INTRAC JOBNAME : M42INSGS /JOB13530 ***
*** MISSION : ARMISS01 RULE : ARWARN01 ***
*** CATEGORY: DAILY OWNER : M66 ***
*** RUN ON : 08/08/00 - 11:47 ***
***---------------------------------------------------------------***
CTB109I- Compilation started
CTB110I- Compilation completed successfully
CTB111I- Highest error code was 0
*
** ENTERING BLOCK: CHECK OF TYPE DATA
*
PRT: TIME IS NOT BETWEEN 12 P.M. AND 6 P.M.
PRT: YOU'RE OK FOR NOW, BUT DO NOT RELAX
==SHOUT : 'TIME IS NOT BETWEEN 12 P.M. AND 6 P.M --- RELAX ************' To: TS
PRESS END TO RETURN. LEFT AND RIGHT TO SEE MORE. 12.12.15
Use the scrolling conventions to scroll the Rule Activity Report screen forward and backward. Press END
(PF03/PF15) to return to the Rule Activity display.
Note: The Rule Activity report is contained in the SYSPRINT member, which is created automatically
during the Control-M/Analyzer invocation.
Control-M/Analyzer generates two other reports: the SYSUSER Report (a listing of all DO PRINT output)
and the SYSRULE report (a listing of the rule). These reports cannot be viewed online but are available in
the SYSOUT of the job that involved the rule. However, DO PRINT output is also included in the Rule
Activity report preceded by the identifier "PRT: ".
176
Control-M/Analyzer User Guide
177
Control-M/Analyzer User Guide
The options described in Table 101 are available from the Print Option window.
Table 101 Options of the Print Option Window
Option Description
1 (Print report) The Rule Activity report is sent to the printer specified in the
DEST/WTR field.
2 (Write report to The Rule Activity report is immediately written to the previously
data set) allocated data set specified in the DSN field.
X (Exit – no action) The Rule Activity report is not printed. The Print Option window is
closed and the Rule Activity display is displayed on the screen.
The parameters described in Table 102 can be modified in the Print Option window:
178
Control-M/Analyzer User Guide
Parameter Description
CLASS Name of the output class to which the Rule Activity report should be
printed when option 1 is selected.
DEST Printer destination where the report should be printed when option
1 is selected (or blank for the main computer printer). Two DEST
fields are provided for the specification of remote printer
destinations. Each destination can be a maximum of eight
characters.
Note: When specifying the WTR field, only one DEST field can be
specified.
WTR Name of the external writer where the report should be printed
when option 1 is selected (or blank for the main computer external
writer).
DSN Specifies the desired display type (or format) of the Rule Activity
display.
Note: The data set specified in the DSN field must already be
catalogued.
The fields describe in Table 103 are displayed in the Print Option window. These fields are displayed for
informative purposes and cannot be modified:
179
Control-M/Analyzer User Guide
Field Description
RULE Name of the rule that created the Rule Activity report.
The message "PRINT REQUEST COMPLETED OK" appears when the report is printed (either to the printer
or to a data set).
To exit the Print Option window without printing, select Option X. The Print Option window is closed and
the Rule Activity display is displayed on the screen.
Note: The Rule Activity report is contained in the SYSPRINT member, which is created automatically
during the Control-M/Analyzer invocation.
180
Control-M/Analyzer User Guide
To return to the IOA Primary Option menu, press the END key (PF03/PF15).
181
Control-M/Analyzer User Guide
Field Description
When Control-M is active at your site, information is displayed in the following fields.
Use Quantity
182
Control-M/Analyzer User Guide
Field Description
Criterion Description
PREFIX prefix If specified, limits the display to conditions with the specified prefix.
To display only conditions containing a specific string, enter the
string preceded by an *.
Example:
If *OK is entered, the following conditions are included in the
display:
UPDATE-ENDED-OK
OK-RUN
OK
183
Control-M/Analyzer User Guide
Criterion Description
DATE from – to Limits the display of prerequisite conditions to the selected date
range. Valid values are:
from – Earliest date in the date range, in mmdd or ddmm
format (depending on the site standard). The default value is
three days prior to the current date. This default can be
modified in the Profile member by the INCONTROL
administrator.
to – Latest date in the date range, in mmdd or ddmm format
(depending on the site standard). The default value is the
current date.
184
Control-M/Analyzer User Guide
Fill in the window fields as described in Table 106 according to the specified ADD command:
185
Control-M/Analyzer User Guide
Field Description
ADD COND Specify the name of the prerequisite condition. The current working
date is displayed as the default date. This date can be modified.
ADD RESOURCE or Enter the name of the Quantitative resource and the quantity to be
ADD RES added. (Where Control-M is active)
ADD CONTROL or Enter the name of the Control resource and the control type
ADD CON (E – Exclusive; S – Shared). (Where Control-M is active)
After filling in the window, press Enter to add the condition or resource.
Note: If a Control resource is manually added with a type of E (Exclusive), no jobs in WAIT SCHEDULE
status which require this resource are submitted. If a Control resource is manually added with a type of
S (Shared), no jobs in WAIT SCHEDULE status which require exclusive access to this resource are
submitted.
To close the window without adding the condition or resource, press the RESET key (PF04/PF16).
Option Description
D (DELETE) Delete a condition or resource from the list. The event is recorded in
the IOA Log file.
C (CHANGE) (At sites where Control-M is active) Change the maximum available
quantity of a Quantitative resource. The event is recorded in the
IOA Log file.
186
Control-M/Analyzer User Guide
By default, conditions and resources are deleted without confirmation from the user.
The User profile can be customized to display a confirmation window with an arrow pointing to a
delete request (beginning with the first request).
Figure 86 IOA Conditions/Resources DELETE Confirmation Window
-------------------------- IOA CONDITIONS/RESOURCES ------------------------(4)
COMMAND ===> SCROLL ===> CRSR
PREFIX ===> COND Y CONTROL Y RES Y STAT Y DATE 0909 - 0909
OPT TYPE CONDITION/RESOURCE IOAID USE QUANTITY MAX *P RBA DATE
COND SALARY-PRSL01A-OK 0909
COND SALARY-PRSL002-OK +----------------------+
COND SALARY-PRSL003-OK | CONFIRM |
D COND CBT-TAPE-ARRIVED <---------| ASK FOR EACH ONE Y |
D COND KPL-PRKPL03-OK +----------------------+
COND KPL-PRKPL04-OK 0909
======== >>>>>>>>>>>>>>>> B O T T O M O F L I S T <<<<<<<<<<<<<<<< ========
If a confirmation window is displayed, fill in the window as described in Table 108 and press Enter.
Table 108 IOA Conditions/Resources DELETE Confirmation Window Options
Option Description
ASK FOR EACH ONE This line is displayed only if more than one delete is requested. It
determines whether individual confirmation is required for each
delete request. Valid values are:
Y (Yes) – Individual confirmation is required for each delete
request. The specified CONFIRM value applies only to the
current order or request.
N (No) – Individual confirmation is not required for each delete
request. The specified CONFIRM value is applied to all delete
requests. (If CONFIRM is Y, all delete requests are processed; if
CONFIRM is N, no delete request is processed.)
Changing the Quantity of a Resource – The CHANGE Option (Available only if Control-M is active)
To request a change to the maximum available quantity of a resource, type C (Change) in the OPT field
to the left of the resource and press Enter. The window illustrated in Figure 87 is opened.
187
Control-M/Analyzer User Guide
Value Description
188
Control-M/Analyzer User Guide
189
Control-M/Analyzer User Guide
Field Description
ADDED Indicates whether the condition has been manually added to the
IOA Conditions file. Valid values are:
Y (Yes) – The condition has been added
N (No) – The condition has not been added
Criteria Description
PREFIX prefix Limits the display to conditions with the selected prefix. Default:
Blank (no limit).
To display only those conditions containing a specific string, enter
the string preceded by an *.
Example:
If *OK is entered, the following conditions are included in the
display:
UPDATE-ENDED-OK
OK-RUN
OK
190
Control-M/Analyzer User Guide
Criteria Description
PENDING Determines whether conditions not yet added are displayed. Valid
values are:
Y (Yes) – Display pending conditions
N (No) – Do not display pending conditions
DATE from – to Limits the display of prerequisite conditions to the specified date
range. Valid values are:
from – Earliest date in the date range, in mmdd or ddmm
format (depending on the site standard). The default value is
three days prior to the current date.
to – Latest date in the date range, in mmdd or ddmm format
(depending on the site standard). The default value is the
current date.
191
Control-M/Analyzer User Guide
In the NAME field of the window, type the name of the condition to be added. If the condition has a date
other than the current working date, enter the date in the date field of the window, in the format DDMM
or MMDD, depending on the site standard.
To add the condition, press Enter.
To close the window without adding the condition, press RESET (PF04/PF16).
Note: Adding a new condition to the IOA Manual Conditions file does not affect the IOA Conditions file.
192
Control-M/Analyzer User Guide
Option Description
A (ADD) Add the condition to the IOA Conditions file (screen 4), and mark it
"Added" (Y) in the IOA Manual Conditions file. The event is recorded
in the IOA Log file.
E (ERASE) Erase (Delete) a condition from the IOA Manual Conditions file. This
does not affect the IOA Conditions file. This option is discussed in
more detail below.
193
Control-M/Analyzer User Guide
If a confirmation window is displayed, fill in the window as described in Table 113 and press Enter:
Table 113 Fields of the IOA Manual Conditions Screen ERASE Confirmation Window
Fields Description
ASK FOR EACH ONE This line is displayed only if more than one erase is requested. It
determines whether individual confirmation is required for each
erase request. Valid values are:
Y (Yes) – Individual confirmation is required for each erase
request. The selected CONFIRM value applies only to the
current order or request.
N (No) – Individual confirmation is not required for each erase
request. The selected CONFIRM value is applied to all erase
requests. If CONFIRM is Y, all erase requests are processed; if
CONFIRM is N, no erase request are processed.
194
Control-M/Analyzer User Guide
195
Control-M/Analyzer User Guide
Field Description
SHOW LIMIT ON Identifies which selection criteria other than yes or no were entered
in the IOA Log Show Screen window (USERID, MEM/MIS, JOBNAME,
CATEGORY, GROUP). For more information, see Filtering the IOA
Log Screen Display (on page 198).
ODATE Original scheduling date of the job associated with the message.
Format is mmddyy, ddmmyy or yymmdd, depending on the site
standard.
Note: When the display type is set to RBA display using the
DISPLAY command, the Relative Byte Address (RBA) of the
message within the IOA Log file is displayed instead of the ODATE.
For more information on changing the screen display, see Changing
IOA Log Screen Display Types (on page 197).
USERID User ID of the job issuing the message, or user ID of the user
writing to the log.
MESSAGE Text of the message. If the message is longer than the space
available on the screen, the message is split and continues on the
following line. Messages relating to a job have the following format:
tasktype memname jobname/jobid message
fromdate – todate Log information displayed in the screen can be limited to the
specified date range in mmddyy, ddmmyy or yymmdd format,
depending on the site standard. If the DATE or the ODATE value for
a message is in the range selected, the message is included in the
IOA Log display. Valid values are:
fromdate – Earliest date in the date range.
todate – Latest date in the date range.
196
Control-M/Analyzer User Guide
Display Description
A Show RBA (Relative Byte Address) display (displays the RBA of the
message within the IOA Log file in place of the ODATE).
D Default display.
197
Control-M/Analyzer User Guide
198
Control-M/Analyzer User Guide
Field Description
199
Control-M/Analyzer User Guide
To edit the currently active filter, it is not necessary to enter the name of the filter or the EDIT
keyword. Enter the SHOW command in the COMMAND field, or press PF02/PF14. The IOA Log
Show Screen window illustrated in Figure 93 is displayed.
Figure 93 IOA Log Screen Show Screen Filters Window
FILTER: DEFA +-------------------- IOA LOG SHOW SCREEN -------------------(5)
COMMAND ===> | FILTER SAVE (Y/N) |
SHOW LIMIT O | |
DATE TIME | |
080800 21354 | |
| |
080800 22040 | |
080800 22040 | |
080800 22040 | CB : RUNTIME SHOUT DAILY GENERAL STATISTICS |
| Y Y Y Y Y |
080800 22040 | |
080800 22040 | |
080800 22040 | CODE |
| URGENCY: REGULAR Y URGENT Y VERY-URGENT Y |
080800 23034 | TASK TYPE CM: JOB CYC EMR STC CST EST ECJ ECS WRN GRP |
080800 23040 | Y Y Y Y Y Y Y Y Y Y |
080800 23040 | CD: REP PRT BKP/MIG RST EMR NOEMR CYC NOCYC |
080800 23040 | Y Y Y Y Y Y Y Y |
| USERID N54A |
080800 23040 | MEM/MIS MIGDASD |
080800 23040 | JOBNAME |
080800 23040 | CATEGORY |
| GROUP |
CMDS: SHOW, +--------------------------------------------------------------+
To create a new filter, open any existing filter and enter a new name and description in the FILTER
and DESC fields (described in "Fields of the IOA Log Show Screen Window," below).
Fields of the IOA Log Show Screen Window
The IOA Log Show Screen window contains the fields described in Table 117.
200
Control-M/Analyzer User Guide
Field Description
FILTER User-assigned name of the filter. The name entered in the FILTER
field can be modified.
If changes to a filter have not been saved, an asterisk is displayed
to the right of the filter name. For more information, see Closing the
IOA Log Show Screen Window (on page 204).
SAVE (Y/N) Specifies whether to save modifications to the filter upon closing the
window.
Note: The INCONTROL administrator can limit which installed INCONTROL products and options each
user may access. However, because all INCONTROL products and the messages they issue are integrated,
it may be important for users to see the messages of products and options to which they have no access.
Therefore, the types of messages for all INCONTROL products are listed in the IOA Log Show Screen
window, and by default, the messages of all installed products are listed in the IOA Log screen.
Fields that define the selection criteria to be applied to the screen are described below. Fill in the selection
criteria as necessary.
Note: The selection criteria marked with the P symbol act on a prefix basis. For example, typing CTB in
the CODE field causes the retrieval of all IOA Log file messages that start with CTB.
201
Control-M/Analyzer User Guide
Table 118 IOA Log Screen Show Filters Window Selection Criteria
Criteria Description
CB message type To limit the type of log messages displayed, specify Y (Yes) or N
(No) under the desired message type. Valid message type codes:
RUNTIME – Messages related to balancing activities produced
by the Control-M/Analyzer Runtime Environment.
DO SHOUT – Messages written to the IOA Log file by the DO
SHOUT parameter. For more information, see DO SHOUT:
Automated Balancing Statement (on page 421).
DAILY – Mission related messages ordered by the New Day
procedure.
GENERAL – General messages on Control-M/Analyzer operation.
STATISTICS – Statistical information on Control-M/Analyzer
operation.
Note: Selection criteria identified by "CB message type" are specific to Control-M/Analyzer.
Other selection criteria, such as those described below, are primarily applicable to other
INCONTROL products, but may also be available to Control-M/Analyzer.
CODEH Show only IOA Log file messages with the specified message IDs or
prefixes. A maximum of six message IDs or prefixes can be
specified.
USERIDH Show only messages of the specified user IDs. A maximum of five
user IDs can be specified.
Note: The MEM/MIS, JOBNAME, CATEGORY, and GROUP selection criteria (described
below) only affect the display of messages related to a mission. Messages not related to a
mission are not affected by these selection criteria and are displayed unless suppressed by
other selection criteria.
202
Control-M/Analyzer User Guide
Criteria Description
IOA Log Show Screen window (at Sites Where Multiple IOA Products Are
Active)
The IOA Log Show Screen window displays different selection criteria depending on which INCONTROL
products are operational at your site.
The IOA Log Show Screen window at sites where all INCONTROL products are active is illustrated in
Figure 94.
Figure 94 IOA Log Show Screen Window at Sites where Multiple INCONTROL Products
are Active
FILTER: DEFA +-------------------- IOA LOG SHOW SCREEN -------------------(5)
COMMAND ===> | FILTER SAVE (Y/N) |
SHOW LIMIT O | CM : D JOB M JOB SHOUT USER GENERAL D INT M INT STAT |
DATE TIME | Y Y Y Y Y N N N |
060800 21354 | CO+CMEM: GENERAL SHOUT JOBS GENERAL W PIPE W JOB W |
| Y Y Y |
060601 22040 | CD+CV : SBSYS REP MIS SHOUT USER GENERAL DAILY MONIT STAT |
060601 22040 | Y Y Y Y Y Y N N N |
060601 22040 | CB : RUNTIME SHOUT DAILY GENERAL STATISTICS |
| Y Y Y Y Y |
060601 22040 | CT : GENERAL SHOUT REAL-TIME UTILITIES |
060601 22040 | Y Y Y Y |
060601 22040 | CODE |
| URGENCY: REGULAR Y URGENT Y VERY-URGENT Y |
060601 23034 | TASK TYPE CM: JOB CYC EMR STC CST EST ECJ ECS WRN GRP |
060601 23040 | Y Y Y Y Y Y Y Y Y Y |
060601 23040 | CD: REP PRT BKP/MIG RST EMR NOEMR CYC NOCYC |
060601 23040 | Y Y Y Y Y Y Y Y |
| USERID N54A |
060601 23040 | MEM/MIS MIGDASD |
060601 23040 | JOBNAME |
060601 23040 | CATEGORY |
| GROUP |
CMDS: SHOW, +--------------------------------------------------------------+
The Control-M/Analyzer selection criteria are described in Table 118 in IOA Log Show Screen Window (on
page 199). For descriptions of the selection options for other INCONTROL products, see the user guides
of the respective products.
The INCONTROL administrator can limit which installed INCONTROL products and options each user can
access. However, because all INCONTROL products and the messages they issue are integrated, it may
be important for users to see the messages of products and options to which they have no access.
Therefore, the types of messages for all INCONTROL products are listed in the IOA Log Show Screen
window, and by default, the messages of all installed products are listed in the IOA Log screen.
203
Control-M/Analyzer User Guide
Key Description
Enter Filtering begins with the first message currently displayed in the
screen and continues downward.
PF07 (UP) Filtering begins with the first message in the IOA Log file and
continues downward.
PF08 (DOWN) Filtering begins with the last message in the IOA Log file and
continues upward.
204
Control-M/Analyzer User Guide
A member contains the calendars required for a specific type of scheduling need. For example, the
calendar member WORKDAYS may contain the calendar definitions for normal workday scheduling.
Each calendar definition in that member defines the schedule for a given year. For example, the
calendar member WORKDAYS may contain calendar definitions 2001, 2002, and 2003. Each of those
definitions contains the normal workday schedule for the corresponding year.
The IOA Calendar facility also enables the definition of varied work periods throughout the year, in special
calendars called periodic calendars.
A calendar definition needs to be created only once. Once defined, the definition is saved and used as
necessary for scheduling. Calendar definitions can be modified or deleted as required.
Any number of calendar members can be defined. Calendar members are stored in calendar libraries
(partitioned data sets). Generally one calendar library is defined at time of installation, and referenced by
the DACAL DD statement.
Note: The IOA Calendar facility does not support members that have been compressed using the ISPF
PACK option.
Screen Description
IOA Calendar Facility Enables specification of parameters that determine which records
entry panel are displayed in subsequent screens.
Calendar List screen Displays the list of calendar members in the selected calendar
library.
Year List screen Displays the list of years for which there is a calendar definition in
the selected calendar member.
Calendar Definition Displays the parameters of the selected calendar for the selected
screen year. This is the main screen of the facility.
To enter the Calendar facility, select Option 8 in the IOA Primary Option menu. The Calendar facility entry
panel is displayed.
Depending on the values entered in the entry panel, you can bypass the Calendar List screen and the
Year List screen.
205
Control-M/Analyzer User Guide
Field Description
206
Control-M/Analyzer User Guide
Field Description
Note: If you use the selection list fields, their values are not erased until you exit the entry panel by
pressing END (PF03/PF15).
207
Control-M/Analyzer User Guide
Option Description
S (SELECT) Display the list of years for the calendar for any purpose, including
editing or modification. Only one calendar can be selected at a time.
B (BROWSE) Display the list of years for the calendar for browsing. Only one
calendar can be selected at a time.
D (DELETE) Delete the calendar (member) from the library. Multiple calendars
can be selected.
208
Control-M/Analyzer User Guide
Command Description
DESC The DESC command displays the calendar description next to the
year. The description is taken from the DESCRIPTION field in the
calendar definition.
209
Control-M/Analyzer User Guide
Option Description
I (INSERT) Insert a new year in the Year List screen and display the Calendar
Definition screen with a predefined year definition for editing. The
predefined calendar definition is defined with the same dates as the
year next to which the I (Insert) request was specified. For more
information, see "Inserting a New Year" below.
W (INSERT BY WEEK Insert a new year in the Year List screen and display the Calendar
DAYS) Definition screen for editing a predefined year definition. The
predefined year definition is defined with the same days of the week
as the year next to which the W (Insert by Week Days) request was
specified. For more information, see "Inserting a New Year." below.
210
Control-M/Analyzer User Guide
When a year is inserted in the Year List, the IOA Calendar facility automatically generates a predefined
calendar definition for the new year, based on the scheduling pattern of the calendar by which the insert
request was specified. This frees the user from having to manually define the new calendar. This
automatically generated calendar definition can be displayed and modified.
Note: The Year list must be kept in ascending order without missing years (for example, 2001, 2002,
2003, 2004, 2005). Each new year must be added at the end of the list.
In calendar definitions, a defined scheduling date is described by both the date (month and day) and the
day of the week. Because a particular date falls on a different day of the week in different years, it is
necessary to indicate whether the scheduling pattern is based on the date or on the days of the week.
This is indicated by the specified insert option.
To define the calendar with the same scheduling dates (although corresponding days of the week
may vary, for example, calendar QUARTERLY described above), type option I (INSERT).
To define the calendar so that scheduling takes place on the same weekdays as in the previous
calendar (although the corresponding dates may vary, for example, calendar WEEKEND described
above), type option W (INSERT BY WEEK DAYS).
If the scheduling pattern is mixed (for example, calendar HOLIDAYS always indicates scheduling on
both January 1 and the first Monday in September), specify the more appropriate option and correct
the new calendar definition manually.
The window contains the fields described in Table 125 (some fields contain default values that can be
modified).
211
Control-M/Analyzer User Guide
Field Description
LIBRARY Library containing the calendar into which the years must be copied.
Must be an existing library. Default: The current library.
CALENDAR Name of the calendar into which the year must be copied.
YEAR Name of the year to be copied. If multiple years are selected, the
window is initially displayed with the first selected year. As each
request is performed or canceled, the next requested year name
appears.
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
01 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8
02 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
03 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +
04 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
05 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +
06 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
-----S-------------S-------------S-------------S-------------S-------------S---
TYPE Y IN ALL THE EXECUTION DAYS 14.37.10
212
Control-M/Analyzer User Guide
Field Description
YEAR Year of the calendar. This value can be modified. When modified,
the values indicated for each date in each month (described below)
are shifted to the appropriate day of the week.
month/dates Each month of the year (01 through 12) of the calendar consists of
the following:
Separator line. Sunday (or Saturday) is marked "S" (according
to the default at your site).
Month label (01 through 12).
Date label for the day of the month.
Updatable field for defining execution dates. Valid values are:
Y (Yes) – Select the rule on that date.
N (No) or ' ' (Blank) – Do not select the rule for execution on
that date.
+ – For a relative calendar, select the closest next "date."
- – For a relative calendar, select the closest previous "date."
213
Control-M/Analyzer User Guide
Periodic Calendars
Some rules must be scheduled periodically, according to schedules that are not easily expressed in terms
of fixed days and dates within months. In these cases, monthly, or even yearly, scheduling definition is
awkward. For example:
A payroll rule needs to be scheduled every other Wednesday:
• In some months, the rule may be scheduled on the first, third, and even fifth Wednesday in the
month. In other months, it may be scheduled on the second and fourth Wednesday in the month.
• In some years, the rule may be scheduled beginning on the first Wednesday of the year. In other
years, it may be scheduled beginning on the second Wednesday of the year.
A rule must be scheduled every 25 days, regardless of date. Such a rule is scheduled on different
dates each month and each year.
The IOA Calendar facility provides special calendars, called periodic calendars, to allow specification of
these scheduling requirements. These periodic calendars are very flexible.
To designate a calendar as periodic, you must type reserved string ==PERIODIC== in the first 12
positions of the description field. Any text can be entered in the rest of the description field. This is
illustrated in Figure 100.
Figure 100 Use of Reserved String "==PERIODIC=="
COMMAND ===> SCROLL===> CRSR
YEAR 2002 - ==PERIODIC== GENERAL WORKDAY CALENDAR
214
Control-M/Analyzer User Guide
For more information on the use of periodic calendars, see DAYS: Mission Definition Parameter (on page
542) and WDAYS: Mission Definition Parameter (on page 592).
Examples
The following are examples of periodic calendars:
Figure 101 Periodic Calendar – Example 1
-----S-------------S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
12 A A A B A
-----S-------------S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
01 B B
-----S-------------S-------------S-------------S-------------S-------------S--
This example includes a period B that begins on March 9. The last marked working day of the period is
March 21, which is followed by a 33-day gap. Assuming that Wish WM2888 has not been used to alter the
default period of 33 days, period B automatically ends on April 23, and April 24 marks the beginning of a
new period B. If no more B identifiers are added, this new B period ends on May 27.
215
Control-M/Analyzer User Guide
Example
Logical year FISCAL01 extends from April 1, 2001 through March 31, 2002.
Logical year FISCAL01 contains a period identified as Period A that has been defined to begin on
December 28, 2001 and to continue through January 15, 2002.
Logical year FISCAL02 extends from April 1, 2002 through March 31, 2003.
Logical year FISCAL02 also contains a period identified as Period A, defined to begin on April 20, 2002
and continue through May 3, 2002.
Rule X is scheduled for the seventh day of Period A in each logical year, through the rule definition
DAYS=D7PA.
In the case of the default gap being 33 days, Rule X runs in January 2002, and again in April 2002, as
expected.
In the case of the default gap being changed from 33 to a longer period, such as 120 days, the first day
of Period A in logical year FISCAL02 occurs less than 120 days after the last appearance of Period A in
logical year FISCAL01. As a result, what appears to be the seventh day in Period A in April 2002 is not
recognized as such, because the "old" Period A overlaps the "new" Period A. Consequently, Rule X does
not run again when the user may have expected it to run.
Deleting Calendars
To delete calendars, type D next to the calendar names in the Calendar List screen and press Enter.
The confirmation window illustrated in Figure 103 is displayed, in sequence, for each calendar selected for
deletion.
Figure 103 Calendar List Screen Delete Confirmation Window
CALENDARS IN LIB IOA.PROD.CAL ------------(8.D)
COMMAND ===> +--------------------------+ SCROLL===> CRSR
OPT NAME --- | CONFIRM DELETE OPTION | E INIT MOD ID
D BANKDAYS <-----------| (Y/N) | 4 104 0 IOAPROD
DAYSOFF +--------------------------+ 0 30 0 IOAPROD
HOLIDAYS 01.00 02/01/28 01/06/29 09:50 15 15 0 IOAPROD
PERIOD1O 01.00 02/01/28 01/06/29 09:50 45 45 0 IOAPROD
D SACAYCLN 01.01 02/01/28 01/11/29 17:43 26 26 0 L3051
SPMONCLN 01.01 02/01/29 01/11/30 15:00 117 104 0 M16A
SPWEKCLN 01.01 02/01/29 01/11/30 15:10 117 104 0 M16A
STOCKDAY 01.00 02/01/30 01/06/31 09:50 45 45 0 IOAPROD
WORKDAYS 01.01 02/01/30 01/11/31 17:43 26 26 0 L3051
======= >>>>>>>>>>>>>>>> NO MORE CALENDARS IN LIBRARY <<<<<<<<<<<<<<<< ======
216
Control-M/Analyzer User Guide
Command Description
CANCEL Cancel the changes made to the calendar definition and return to
the Year List screen.
Note: The following exit commands retain changes to the calendar definition in memory.
To permanently save the changes to disk, you must also request that the changes be saved
when you exit the Year List screen.
END (PF03/PF15) Keep changes to the calendar definition in memory and exit to the
Enter Year List screen.
NEXTYEAR Keep changes to the calendar definition in memory and display the
(PF11/PF23) next calendar definition in the Year List screen.
PREVYEAR Keep changes to the calendar definition in memory and display the
(PF10/PF22) previous calendar definition in the Year List screen.
217
Control-M/Analyzer User Guide
218
Control-M/Analyzer User Guide
OPTION ===>
Note: If DOCU/TEXT has also been installed at your site, an additional utility, Option U1, is displayed in
the Online Utilities Menu.
To access an available utility, type the desired option in the OPTION field and press Enter.
If no other BMC products are installed at your site, the only option that is directly available to
Control-M/Analyzer is Option I1, the IOA Utility, which is described on the following pages. For the
descriptions of other utilities on the menu, see the user guides of the relevant products.
Online utility screens utilize standard ISPF profile capabilities.
219
Control-M/Analyzer User Guide
Quick transfer to a utility can be performed by entering =opt from another utility screen, or =6.opt from a
non-utility screen (for example, the IOA Log screen), where opt is the 2-character option identified on the
IOA Online Utilities menu.
To activate the utility, fill in the fields described in Table 128 and press Enter:
220
Control-M/Analyzer User Guide
Field Description
CONDITION DATE 4-character date associated with the specified condition. Valid values
are:
date – Valid date in date in mmdd or ddmm format, depending on
the site standard.
STAT – Static. Value assigned to conditions that are not
date-dependent, such as DATABASE-OK.
221
3
3
Control-M/Analyzer Variables
This chapter includes the following topics:
Control-M/Analyzer Variables (on page 223)
• Variable Types (on page 223)
• %% Operator (on page 224)
• Passing Variables to Blocks, Rules and User Routines (on page 224)
Database Variables (on page 225)
• Variable Generation Attributes (on page 226)
• Accessing Database Variables (on page 233)
Automatic Database Variable Creation (on page 235)
Database Variable Definition Screen (on page 236)
Defining Database Variables (on page 237)
Database Variable Parameters – Summary (on page 238)
NAME Basic Parameters (on page 239)
GROUP Basic Parameters (on page 241)
CREATED...BY...TYPE: Basic Parameters (on page 243)
DESC: Basic Parameters (on page 245)
MAXIMUM ACTIVE GENERATIONS: Generation Parameters (on page 246)
GEN TYPE: Generation Parameters (on page 248)
CURRENT ACTIVE GENERATIONS: Generations Parameter (on page 249)
OLDEST... DATE: Generation Parameters (on page 251)
LATEST... DATE: Generation Parameters (on page 253)
TYPE: Validation Parameter (on page 254)
MASK: Validation Parameters (on page 255)
AutoEdit Variables (on page 256)
• How AutoEdit Variables Are Used (on page 256)
• Searching for AutoEdit Variables (on page 258)
• Format (on page 258)
• Rules of AutoEdit Variable Substitution (on page 258)
• Assigning AutoEdit Variables With DO SET (on page 259)
222
Control-M/Analyzer User Guide
Control-M/Analyzer Variables
Control-M/Analyzer provides the capability to save and retain information in variables. Variables are used
to store system information, results of calculations, and information extracted from files. The maximum
length of Control-M/Analyzer variables (after resolving the %% operators described later in this chapter)
is 100 bytes, except for long string variables. (See SYSLSTR1,…SYSLSTR9 later in this chapter.)
Control-M/Analyzer variable names are not case sensitive.
Variable Types
Control-M/Analyzer uses the following types of variables:
Database
AutoEdit
Local
System
Each type differs from the others in the way it can be used and in the manner (and length of time) it is
stored, as described in Table 129.
223
Control-M/Analyzer User Guide
%% Operator
The %% operator operates on Local, Database and System variables in the same manner as it operates
on AutoEdit variables. It provides AutoEdit capabilities to System variables and user-defined Local and
Database variables.
The %% variable format is:
%%var
In this format, var represents the name of the variable.
For more information about AutoEdit variable resolution, see AutoEdit Variables (on page 256).
224
Control-M/Analyzer User Guide
Note: Database variables can be embedded only if they have not yet been committed. After a Database
variable has been committed, it cannot be specified in the ARG parameter of DO BLOCK, DO CALLUSER,
or DO RULE.
Database Variables
When a rule processes data, the rule can save values in the Control-M/Analyzer Database for future use.
These values can be accessed by both the original rule that created the variable and other
Control-M/Analyzer rules. All Control-M/Analyzer rules can share information by accessing the Database.
Database variables must be created (defined) before they can be used. The definition consists of
parameters that contain basic information about the variable (such as its group and name). These
parameters also determine the number of values a variable can have. Each variable value represents a
generation: a historical occurrence of a variable and its value at that time.
Once a Database variable definition is created, rules can refer to and add generations to that variable.
Attributes can be specified to identify (to refer to) a specific variable generation from within a balancing
rule definition. The attributes are described briefly in Table 130.
225
Control-M/Analyzer User Guide
Attribute Description
Database prefix Name prefix DB_, which identifies the variable as a Database
variable.
Group name Name of the group to which the Database variable belongs.
Example
Distinguish between accounting and marketing departments’ total expense figures by referring to the
group name when accessing the variables:
DB_ACCOUNTING.TOTALEXP and DB_MARKETING.TOTALEXP
For additional information about referring to Database variables, see "Variable Generation Attributes"
below.
Note: If a rule definition refers to an undefined Database variable, Control-M/Analyzer can be
customized to: Automatically create the variable based on default settings, or
Cause a runtime error and display a message in the sysout of the job.
For further information, see Automatic Database Variable Creation (on page 235).
226
Control-M/Analyzer User Guide
The variable name, prefixes, and suffixes form the Variable Reference Statement. The Variable Reference
Statement identifies the variable needed by a rule. A description of Database variable name components,
an explanation of how they are structured to produce Database Variable Reference Statements, and
examples of Database Variable Reference Statements are provided below.
Command Description
AutoEdit prefix Prefix %% to the entire Database variable name (including prefix
DB_) only when specifying AutoEdit substitution. See "AutoEdit
Substitution of Database Variables" below.
Database prefix Prefix DB_ to the Database variable name. This is a reserved prefix.
It cannot be used for other types of Control-M/Analyzer variables.
Prefix DB_ is mandatory when referring to a Database variable from
within a rule definition. Prefix DB_ should not be specified when
defining the Database variable.
Group name prefix Name of the group to which the variable belongs. 1-20 characters.
Optional.
If not specified, the group of the variable is assumed to be the
group of the rule (meaning, the group under which the rule
executes). If specified, a period (.) is used as the separator between
the group name and variable name. However, if this Database
variable will be resolved by AutoEdit substitution (meaning, it has a
%% prefix) use a colon (:) as the separator between the group
name and variable name.
For more information, see the examples that follow this table.
Variable name Name of the variable, 1-20 characters. The first character must be
alphabetic. Mandatory.
Variable names must be unique within a group. However, the same
variable name may be specified in different groups.
227
Control-M/Analyzer User Guide
Command Description
Generation suffix Numeric reference to the current or any previous value of the
variable. Optional.
The prefix @G must precede the generation specification.
Generations are automatically numbered and renumbered from
newest to oldest in ascending order. The current value (and default)
is @G0, the preceding value is @G1, the value before the preceding
value is @G2, and so on.
Date suffix Date of Database variable creation. Optional. When specified, the
date must be in yymmdd format.
The prefix @D must precede the date specification.
Run ID suffix Site-defined run identifier. Run IDs can only contain alphanumeric
characters. Optional.
The prefix @R must precede the run ID specification.
The run identifier of all variables committed by a rule is determined
by the value of System variable SYSRUNID. This variable must be
set before the first DO COMMIT statement in the rule.
Note: When Database variables are accessed as input, each existing generation of a variable can be
accessed by specifying its generation number or another attribute of the variable generation. When
variables are accessed as output, only the user key attribute can be specified, indicating the user key of
the newly created generation.
228
Control-M/Analyzer User Guide
229
Control-M/Analyzer User Guide
Example
Figure 108 AutoEdit Substitution of Database Variables
LIBRARY : CTB.PROD.RULES RULE : DBVARAE
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP PERSONNEL
UPDATED 04/04/00 - 10:20:09 BY M43
DESC
OPTIONS
===========================================================================
EXECUTE GETAVG UPON C
ON FILE FILENAME A00.EMPS
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 001 - 001 STOP AND/OR
STRING = .AL.
DO EXTRACT = DB_PERSONNEL.EMPNAME
LEVEL LINE +000 COL 0001 - 0020 PROCESS TYP
DO EXTRACT = DB_PERSONNEL.EMPSALARY
LEVEL LINE +000 COL 0021 - 0032 PROCESS TYP
DO PRINT = %%DB_PERSONNEL:EMPNAME %%DB_PERSONNEL:EMPSALARY F C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE UPON C
PLEASE FILL IN RULE DEFINITION 11.42.28
For additional information on AutoEdit substitution, see Rules of AutoEdit Variable Substitution (on page
258).
230
Control-M/Analyzer User Guide
Attributes Description
Group name If no group name is specified, the group of the current rule is
assumed. Control-M/Analyzer scans the Database for the specified
or assumed group name. If the searched for group name does not
exist, a runtime error occurs.
Variable name After the group is found, Control-M/Analyzer searches for variables
with the specified variable name.
A runtime error occurs when trying to read a Database variable that
does not exist in the Database for the specified or assumed group.
When setting (writing) a Database variable that does not exist in the
Database for the specified or assumed group:
The variable is created if automatic Database variable creation is
enabled.
A runtime error occurs if automatic Database variable creation is
disabled.
For more information, see Automatic Database Variable Creation (on
page 235).
Note: User key and run ID are mutually exclusive and cannot be
specified in the same Variable Reference Statement.
231
Control-M/Analyzer User Guide
If several possibilities remain after all specified attributes have been examined, the oldest match is
accessed.
Examples
When matching the Variable Reference Statements listed below, refer to Table 134, which describes
Database variable attributes.
Table 134 Variable Database Attributes
DB_MARKET.TAX_OWED G
DB_MARKET.GROSS_PROFIT@G1 B
DB_MARKET.GROSS_PROFIT@D980202 A
DB_MARKET.GROSS_PROFIT@D980303 Error
DB_MARKET.GROSS_PROFIT@D980101@KACTUAL B
DB_MARKET.GROSS_PROFIT@KACTUAL B
DB_MARKET.GROSS_PROFIT@KFINAL Error
DB_MARKET.@G0 Error
232
Control-M/Analyzer User Guide
233
Control-M/Analyzer User Guide
Note: In the example above, if the DO COMMIT statement is omitted, the DB_TOTAL variable is
automatically committed and unlocked during rule termination.
To exclusively perform calculations on a variable without storing the result in the Database: Use a DO
COMMIT statement with the DELETE option. No variables are committed (written) but the DO
COMMIT statement unlocks the variable.
Table 137 Committing Database Variables – Example 2
To access and process a variable without restricting its use by other rules, write the value of the new
variable to the Database after the new value has been calculated.
Table 138 Committing Database Variables – Example 3
234
Control-M/Analyzer User Guide
235
Control-M/Analyzer User Guide
Before proceeding with this chapter, all Control-M/Analyzer users should read the following:
Database Variable Definition Facility (on page 86)
Overview (on page 58), and the description of the Online facility that follows that page
All parameter definitions are stored in the Control-M/Analyzer Database. The Database consists of two
files – the Database Variable Basic file and the Database Variable Generation file. For additional
information, refer to the INCONTROL for z/OS Installation Guide.
Maintenance of the Database and management of Database variable definitions are performed using the
Online Definition facility and Database maintenance utilities. For more information, see the INCONTROL
for z/OS Administrator Guide, and the INCONTROL for z/OS Utilities Guide.
236
Control-M/Analyzer User Guide
237
Control-M/Analyzer User Guide
Parameter Description
OLDEST... DATE Generation and creation date of the oldest generation of the
Database variable. For display only.
LATEST... DATE Generation and creation date of the latest generation of the
Database variable. For display only.
The following pages contain a detailed description of each of the Control-M/Analyzer Database variable
parameters. Parameters are arranged alphabetically.
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 Database Variable Definition
screen.
General Information explaining the parameter and its usage.
Where applicable, some practical examples, illustrating implementation of the parameter.
For more information, see Database Variable Definition Facility (on page 86).
238
Control-M/Analyzer User Guide
NAME specifies a Database variable name of 1 through 20 characters. No blanks (except trailing blanks)
are permitted. The first letter must be alphabetic. Mandatory.
General Information
Variable names must be unique within a group.
When specifying the variable name in the Database Variable Definition screen, the DB_ prefix is assumed
and should not be specified.
When referring to a Database variable from within a rule definition, the DB_ prefix is not assumed and
must be specified.
The specified group name becomes an assumed prefix (attribute) of the variable name. When a rule
definition refers to a variable within the current group, the group name does not need to be specified.
When a rule definition refers to a variable from another group, the group name must be indicated
explicitly.
Example 1
Table 141 NAME Parameter Database Variables
OP (Operations) DB_OP.TOTAL1
If the current group is QC and the rule attempts to access TOTAL1 from within the QC group, the variable
can simply be referred to as DB_TOTAL1 within the rule definition.
If the current group is QC and the rule attempts to access TOTAL1 from within the OP group, the variable
must be referred to as DB_OP.TOTAL1 within the rule definition.
239
Control-M/Analyzer User Guide
For details about referring to Database variables within rule definitions, see Database Variable Reference
Method (on page 230).
Example 2
Figure 111 Name Parameter – Example 2
------------------- CONTROL-M/ANALYZER VARIABLE DEFINITION ---------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
240
Control-M/Analyzer User Guide
GROUP specifies a group name of 1 through 20 characters. No blanks (except trailing blanks) are allowed.
GROUP is automatically set to the group name specified when entering the Database Variable Definition
screen. Mandatory.
General Information
This parameter associates the Database variable with a certain group. The specified group becomes an
assumed prefix to (and attribute of) the Database variable name.
GROUP appears in all important messages relating to the Database variables of the group.
Jobs, missions, and variables may be grouped to create a separate environment for different applications.
A detailed explanation of the GROUP concept is provided in Group Concept and Group Modes (on page
33).
241
Control-M/Analyzer User Guide
Example
Figure 113 Group Parameter Example
------------------ CONTROL-M/ANALYZER VARIABLE DEFINITION ----------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
242
Control-M/Analyzer User Guide
The date and time created and the BY and TYPE subparameters are set by Control-M/Analyzer and cannot
be changed. For display only.
The BY subparameter indicates the user ID of the online or batch user who created the Database
variable.
The TYPE subparameter can have the values shown in Table 142.
Table 142 Values of the TYPE subparameter
Value Description
General Information
The date, time, and creator are established when the Database variable is initially created.
The TYPE subparameter is set according to the environment in which the Database variable was created.
If the variable was created by the Online facility, TYPE is set to O. If the variable was automatically
created by a rule, TYPE is set to B.
243
Control-M/Analyzer User Guide
Example
Figure 115 CREATED...BY...TYPE...Parameter Example
----------------- CONTROL-M/ANALYZER VARIABLE DEFINITION -----------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
244
Control-M/Analyzer User Guide
General Information
A Database variable description can be specified in any language. The description is used as an internal
help facility to assist the user in identifying the variable.
Example
Figure 117 DESC Parameter Example
-------------------- CONTROL-M/ANALYZER VARIABLE DEFINITION --------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
245
Control-M/Analyzer User Guide
Mandatory. The maximum number of Database variable generations Control-M/Analyzer can track is 1000.
The minimum value for this parameter is 1.
This parameter should be specified the first time the Database variable is created (with option I) by the
Online facility.
General Information
The MAXIMUM ACTIVE GENERATIONS parameter can be changed at any time on the Database Variable
Definition screen. It can also be changed by the CTBDBVCG utility. For more information about the
CTBDBVCG utility, see the INCONTROL for z/OS Utilities Guide.
The current (latest) generation of a variable is always generation 0. The previous historical occurrence
(value) of a variable is generation –1, and so on.
Therefore, if 50 generations of a variable have been stored, the earliest generation is generation –49.
Because the maximum number of generations that Control-M/Analyzer can track is 1000, the largest
generation number possible
is –999.
MAXIMUM ACTIVE GENERATIONS is used by Control-M/Analyzer to determine when to delete earlier
variable generations to make room for newer ones.
For example, assume that the MAXIMUM ACTIVE GENERATIONS parameter is set to 10 and there are
currently 10 active generations (designated 0 through –9). If a rule adds a new value to the variable, the
oldest generation, –9, is deleted. The new value becomes generation 0, the previous current value
becomes generation –1, and so on.
However, if the MAXIMUM ACTIVE GENERATIONS parameter is set to 10 and there are currently 5 active
generations (designated 0 through –4), no values are deleted if a rule adds a new value to the variable.
When a new value becomes generation 0, the previous current value becomes generation –1, and so on,
resulting in 6 active generations (designated 0 through –5).
Deleted Database variables are assigned a generation value of ***.
246
Control-M/Analyzer User Guide
Example
Figure 119 MAXIMUM ACTIVE GENERATIONS Parameter Example
------------------- CONTROL-M/ANALYZER VARIABLE DEFINITION ---------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/09
===========================================================================
TYPE VAR
MASK
247
Control-M/Analyzer User Guide
248
Control-M/Analyzer User Guide
For display only. The displayed number never exceeds the value of the MAXIMUM ACTIVE GENERATIONS
parameter.
General Information
This informative field is automatically updated by Control-M/Analyzer throughout the existence of a
variable and cannot be changed by the user.
If CURRENT ACTIVE GENERATIONS would exceed the number specified in the MAXIMUM ACTIVE
GENERATIONS parameter, Control-M/Analyzer removes the oldest active generation. See the MAXIMUM
ACTIVE GENERATIONS parameter for a description of how Control-M/Analyzer removes the oldest
generation.
249
Control-M/Analyzer User Guide
Example
Figure 122 CURRENT ACTIVE GENERATIONS Parameter Example
---------------- CONTROL-M/ANALYZER VARIABLE DEFINITION -----------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE B (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
============================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
============================================================================
TYPE VAR
MASK
250
Control-M/Analyzer User Guide
General Information
The generation number and creation date of the oldest existing generation for the current Database
variable is displayed.
Example
Figure 124 OLDEST...DATE Parameter Example
---------------- CONTROL-M/ANALYZER VARIABLE DEFINITION -----------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
251
Control-M/Analyzer User Guide
252
Control-M/Analyzer User Guide
General Information
The generation number and creation date of the latest generation of the Database variable is displayed.
Unless "deleted," the latest generation of a Database variable is represented by the number 0. If the
latest generation has been "deleted," it is represented by ***.
253
Control-M/Analyzer User Guide
Example
Figure 126 LATEST...DATE Parameter Format
------------------- CONTROL-M/ANALYZER VARIABLE DEFINITION ---------------(BV.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
NAME TOTAL GROUP INVENTORY
CREATED 11/11/97 - 10:10:10 BY M18 TYPE O (B-BATCH,O-ONLINE)
DESC TOTAL ITEMS IN INVENTORY FOR ALL PARTS
===========================================================================
MAXIMUM ACTIVE GENERATIONS 0032 GEN TYPE I (I-INDEPENDENT,H-HIERARCHICAL)
CURRENT ACTIVE GENERATIONS 0032
OLDEST -31 DATE 11/11/97
LATEST 0 DATE 04/04/00
===========================================================================
TYPE VAR
MASK
254
Control-M/Analyzer User Guide
255
Control-M/Analyzer User Guide
AutoEdit Variables
AutoEdit variables are generic variables with values that are determined (resolved) at the time a rule
containing an AutoEdit variable is invoked.
Using the AutoEdit facility enhances the variety of balancing actions Control-M/Analyzer can perform.
256
Control-M/Analyzer User Guide
If the MEM AutoEdit member does not currently exist in the LIBSYM library, the member is added to
the library.
If the MEM AutoEdit member does exist in the LIBSYM library, the member is not replaced with the
new values and a runtime error occurs.
The characters @ and # are not valid in Control-M/Analyzer AutoEdit variable names.
For an example of how the %%LOCAL_CURRENCY and %%ROUND_CURRENCY AutoEdit variables can be
used for currency conversions, see D Euro Support (on page 678).
The Rule Definition screen illustrated in Figure 129 displays examples of AutoEdit Variables.
Figure 129 Examples of the Auto Edit Variables
LIBRARY : CTB.PROD.RULES RULE :BANKDAYS
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INIT UPON C
ON DATA
ALWAYS
DO GETMEM = LSTBNKDY
LIBSYM CTB.PROD.SYMBOLS
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE GETDATES UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME BANKDAYS JOBNM
MODE PG LINECT 0000 DATASTAMP
WHEN LINE 001 - 060 COL 001 - 132 STOP AND/OR
STRING = |
EXTRACT = MONTH
LEVEL LINE +000 COL +002 - +005 PROCESS TYP
ADDSYM = %%LAST_BANKING_DAY_%%MONTH MEM LSTBNKDY
LIBSYM CTB.PROD.SYMBOLS
DO EXTRACT = %%LAST_BANKING_DAY_%%MONTH
LEVEL 0 LINE +000 COL +002 - +007 PROCESS TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE FINISH UPON C
ON DATA
ALWAYS
DO PPUTMEM = LSTBNKDY
LIBSYM CTB.PROD.SYMBOLS
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
Each rule can reference (read) more than one AutoEdit member. Other AutoEdit members can be
accessed with a DO GETMEM statement. AutoEdit members can be written to disk using a DO PUTMEM
statement. For additional information see DO ADDSYM: Automated Balancing Statement (on page 364),
DO GETMEM: Automated Balancing Statement (on page 397), and DO PUTMEM: Automated Balancing
Statement (on page 412).
Note: No rollback mechanism is available for AutoEdit members. It is your responsibility to handle
changes to AutoEdit members.
257
Control-M/Analyzer User Guide
Format
AutoEdit processing can be performed on all types of Control-M/Analyzer variables: Local, Database,
System and AutoEdit.
Variables to be resolved are recognized by their %% prefix. These variables are referenced in the usual
IOA AutoEdit manner. The names of these variables are not case-sensitive.
AutoEdit processing can be performed on Control-M/Analyzer Local, Database and System variables by
prefixing %% to the variable name. If both a Local variable and an AutoEdit variable (read from an
AutoEdit member by a DO GETMEM statement) exist with the same variable name, the value of the Local
variable is resolved.
The AutoEdit variable format is %%var, %%DB_var or %%SYS_var, where var represents the name of
the variable.
For information about processing (resolving) %% operators, see Rules of AutoEdit Variable Substitution
(on page 258).
258
Control-M/Analyzer User Guide
To put a period between two AutoEdit symbols, use two consecutive periods. For example
%%SYSDAY..%%SYSMONTH
resolves on the 3rd of December to
03.12
To concatenate a symbol and a constant, use %%. (concatenation symbol). For example
A91%%SYSDAY%%.UP
resolves on the 3rd of December to
A9103UP
Note: The combination A91%%SYSDAYUP involves a search for the symbol %%SYSDAYUP.
On Sunday, the 24th of December, the user-defined symbol %%BACKUP_UNIT_1 is assigned the value
EE1224.
If the symbol assigned in a DO SET statement is not completely resolved, the default action is to cancel
the DO SET action and all subsequent actions of the current rule activation. This default can be
overridden by specifying SYSRESOLVE=NO in a previous DO SET statement, in which case the symbol is
resolved as completely as possible before performing the DO statement in which it is found. The
SYSRESOLVE statement format is described in SYSRESOLVE Control Statement (on page 260).
Note: SYSRESOLVE=NO is not currently available.
259
Control-M/Analyzer User Guide
adds the symbol to the specified AutoEdit member. The symbol can subsequently be given a value. The
newly created AutoEdit variable is saved in the PDS library when the entire AutoEdit member is saved by
the DO PUTMEM statement.
If one or more symbols cannot be resolved, the rule actions are canceled.
SYSRESOLVE=NO
Symbols that cannot be fully resolved are resolved as completely as possible before performing the
current DO statement.
A SYSRESOLVE statement is assigned in a DO SET statement and affects all subsequent statements until
the next SYSRESOLVE statement in the rule.
Example
DO SET = SYSRESOLVE=NO
DO SHOUT TO TSO-PROD URGENCY R
= PLEASE SET THE VALUE OF THE %%INDEX_DOLLAR
In this example, the message "shouted" to user TSO-PROD contains the string %%INDEX_DOLLAR
literally – %%INDEX_DOLLAR is not resolved.
Local Variables
Control-M/Analyzer Local variables are used to temporarily store values that are needed only by the
current rule. The current rule has complete access to the variable, but upon rule termination the variable
value is no longer kept. Rules that are called by the current rule (by statement DO RULE) do not have
access to the Local variables of the calling rule unless these variables are passed as arguments.
Format
The maximum length of local variable names is 20 characters. The first character must be alphabetic
(A-Z). The remaining characters may be alphabetic, numeric, or the symbols @, _, #, and $. Local
variable names are not case sensitive. Local variable names cannot start with Database prefix DB_ or
System variable prefix SYS.
260
Control-M/Analyzer User Guide
General Information
Local variables may be accessed through:
Direct reference in a Control-M/Analyzer expression.
DO SET = COUNTER=100
Reference using the %% operator.
DO SHOUT TO TSO-M18 URGENCY R
= LOOP OCCURRED %%COUNTER TIMES
Local variables are created during rule execution at the first reference to the variable name. DO SET and
DO EXTRACT statements are used to give values to Local variables. For more information on DO SET and
DO EXTRACT statements, see Rule Definition (on page 348).
System Variables
System variables are predefined, commonly used variables with values that are automatically updated and
maintained by Control-M/Analyzer. They are global in nature and can be accessed by any
Control-M/Analyzer rule at any time.
Format
The System variables are listed below. System variables have reserved names that are not case sensitive.
General Information
There are two categories of System variables:
Read-only variables that cannot be changed by the user.
These variables, such as SYSVER (Control-M/Analyzer version), SYSDATE (system date) and SYSTIME
(system time), are determined by the system.
Variables that can be changed by the user.
These variables can be set using DO EXTRACT and DO SET statements. These variables include
BARGnn (for passing arguments to a block), RARGnn (for passing arguments to a rule), and
SYSCPROCn (for defining sequences of built-in or user-defined processes). For more information, see
DO EXTRACT: Automated Balancing Statement (on page 382) and DO SET: Automated Balancing
Statement (on page 418). For more information about SYSCPROCn, see Summary of System Variables
(on page 262).
System variables can be accessed by:
A direct reference in a Control-M/Analyzer expression:
IF 'SYSRULE=REORDER'
A %% operator variable reference:
DO PRINT 'RULE TERMINATED OK ON %%SYSDATE'
261
Control-M/Analyzer User Guide
For information about processing the %% operator, see Rules of AutoEdit Variable Substitution (on page
258).
Variable Description
SYSCENT First two digits in the current year (for example, 19 in the year
1998).
SYSCENT returns 20 on 1 January 2000.
262
Control-M/Analyzer User Guide
Variable Description
263
Control-M/Analyzer User Guide
Variable Description
264
Control-M/Analyzer User Guide
Variable Description
265
Control-M/Analyzer User Guide
Variable Description
SYSLSTR1,... These are long string variables that are not limited in length
SYSLSTR9* (unlike regular variables that are limited to 100 bytes). These
long string variables can be used by the following
Control-M/Analyzer statements, functions and operators:
IF expressions
DO PRINT
DO SET
SUBSTR
MSUBSTMASK
// (String concatenation)
266
Control-M/Analyzer User Guide
Variable Description
267
Control-M/Analyzer User Guide
Variable Description
SYSRC System return code. Can be used to check the results of several
functions (HOWMANY, NEXTVAR, SUM). Valid values:
0 – The function was successful.
Other – The function failed. Check the specific rule or user
routine for a list of possible return codes and their
significance.
268
4
4
Expressions and Functions
This chapter includes the following topics:
Expressions (on page 271)
• Operators (on page 271)
• Order of Operations (on page 273)
• Operands (on page 274)
• AutoEdit Processing (on page 275)
• Calculation Mode (on page 276)
• Rounding Method (on page 276)
Functions (on page 277)
• Function Summary (on page 278)
• Function Syntax (on page 281)
269
Control-M/Analyzer User Guide
270
Control-M/Analyzer User Guide
Expressions
Control-M/Analyzer expressions provide the capability to compare and initialize variables. Expressions are
composed of operators and operands in the following format:
operand operator operand
The EXECUTE statement allows and the IF statement requires the specification of an expression:
EXECUTE CHECKVAR UPON TOTAL > 0
IF EMPNAME = 'JONES'
Operators
There are four types of operators:
Arithmetic operators perform calculations (for example, 100*10).
Standard Comparative operators compare operands and resolve to either true or false (for example, 5
> 4, TOTAL .LT. 100, NAME = ‘SMITH’).
If both operands are numeric, a numeric comparison takes place. If either operand is nonnumeric, the
operands are compared as character strings from left to right.
Forced Character Comparative operators compare operands as character strings and resolve to either
true or false. These operators start with the letter C.
Forced Character operators specify a character comparison even if both operands are numeric.
Character operands and expressions using Forced Character operators are compared as character
strings from left to right. For example:
91 CGT 1000 resolves to true
(because 9 is greater than 1)
Boolean Comparative operators evaluate to true or false using Boolean logic operators AND and OR
(for example, 10 > 5 AND 100 > 10). An AND expression evaluates to true if both of its operands
resolve to true. An OR expression evaluates to true if either of its operands resolves to true.
Table 144 lists Control-M/Analyzer operators by type.
271
Control-M/Analyzer User Guide
Arithmetic + Addition
- Subtraction
* Multiplication
/ Division
272
Control-M/Analyzer User Guide
Order of Operations
The Control-M/Analyzer order of operations is the standard natural order of arithmetic expression
evaluation.
Table 145 Control-M/Analyzer Order of Operations
Expression Description
*,/ Multiplication and division, evaluated from left to right, are resolved.
+,– Addition and subtraction, evaluated from left to right, are resolved.
If a function receives an expression as input, that expression is evaluated (according to the above order
of operations) independently before the original function is evaluated.
273
Control-M/Analyzer User Guide
Operands
A Control-M/Analyzer operand can be a character string, numeric constant, or variable.
Table 146 Control-M/Analyzer Operands
Operand Description
Character String Any string between apostrophes (single quotes); for example, ‘This
is a string’. Do not use an apostrophe within a string. Use two
consecutive single quotes within a string to produce an apostrophe.
Do not use double quotes; for example, "This is not a string". For
more information, see Expression Delimiters (on page 510).
Numeric Constant Any decimal number. A negative sign (for example, –5, –5.01) can
be specified.
5 GT 32 False
5 CGT 32 True
‘5’ GT 32 False
5 GT ‘32’ False
274
Control-M/Analyzer User Guide
5 + 2 7
8 / 2 4
9 / 2 4.5
1 + 2 – 3 * (–4) 15.0
1 + 2 LE SQRT(9) True
809 GT 90 True
Note: A numeric value surrounded by single quotes is treated as a numeric value when compared. A
nonnumeric value surrounded by single quotes is treated as a string.
AutoEdit Processing
Expressions can contain variables prefixed by the AutoEdit operator %%. AutoEdit processing makes the
specification of expressions dynamic and flexible.
When Control-M/Analyzer encounters an expression, the contents of the expression are scanned for
special symbols (starting with %%). These symbols are assumed to be variables and are replaced by their
current value. The modified expression is then evaluated.
The AutoEdit operator and the AutoEdit facility and its variables are described in detail in AutoEdit
Variables (on page 256), and AutoEdit Substitution of Database Variables (on page 229).
275
Control-M/Analyzer User Guide
Example
Table 148 AutoEdit Processing Examples
Expression Description
Calculation Mode
Control-M/Analyzer performs all arithmetic calculations in floating point mode. The result is always
returned as a floating point number.
Before performing arithmetic calculations, Control-M/Analyzer checks that each operand resolves to a
valid number. If an operand is nonnumeric, the result is a Control-M/Analyzer runtime error.
Rounding Method
Numbers are rounded automatically to the number of decimal places specified in the site default. When
comparing two numbers, Control-M/Analyzer rounds the numbers to the specified precision. Rounding is
suppressed if the site default is set to 99 decimals. For details about changing the default setting, see the
discussion about modifying IOA product defaults in the INCONTROL for z/OS Administrator Guide.
Examples
If precision has been specified to two decimal places:
Table 149 Rounding Method Expression Examples
276
Control-M/Analyzer User Guide
Functions
Functions are used to process numeric and character string values within an expression. Input arguments
specify information necessary for a function to operate. Functions return processed values to the rule for
further evaluation and processing.
Functions can perform sophisticated operations. Control-M/Analyzer functions are divided into the
categories described in Table 150.
Table 150 Control-M/Analyzer Functions
Function Description
277
Control-M/Analyzer User Guide
Function Summary
The list in Table 151 summarizes Control-M/Analyzer functions by category. Each function and its syntax
are described in detail in alphabetical order on the following pages.
Table 151 Control-M/Analyzer String Functions
Function Description
FINDCH Returns the position in a data string of the first occurrence of any
one of the characters specified in a substring.
278
Control-M/Analyzer User Guide
Function Description
MOD Returns the remainder that results when its second argument is
divided by its first argument.
POW Calculates the result of raising its first argument to the power of its
second argument.
SUM Calculates the sum of the variables the names of which match a
specified pattern (mask).
Function Description
NEXTVAR Returns the next variable in a set of variables that match a specified
pattern (mask), thus enabling Control-M/Analyzer to scan the entire
set.
279
Control-M/Analyzer User Guide
Function Description
Function Description
Function Description
Function Description
280
Control-M/Analyzer User Guide
Function Description
Function Syntax
When specifying functions in a Control-M/Analyzer expression, take the following into consideration:
Each function returns a value.
All functions consist of a function name and a set of parentheses. Arguments are specified between
the parentheses. Each function can receive a different number of arguments. Commas are used to
separate arguments listed between parentheses.
FUNCTION(argument1, argument2, ... argumentn)
No space can exist between the function name and the first parenthesis.
A function may be passed as an argument to another function. This is called function nesting. When
functions are nested, the innermost function is resolved first. Its value is then passed to the outer
function. There is no limit to the number of nested functions allowed in Control-M/Analyzer
An expression may be passed as an argument to a function. This type of argument is called a nested
expression. In this case, the innermost expression is resolved first. Its value is then passed to the
function, that is resolved next. The outer expression is resolved last. There is no limit to the number
of nested expressions allowed in Control-M/Analyzer.
Example
FUNCTION(FUNCTION(ARGUMENT1))
281
Control-M/Analyzer User Guide
ABS: Functions
Calculates the absolute value of its numeric argument.
Figure 130 ABS Format
Syntax
ABS(value)
General Information
ABS returns the absolute value of the value or expression between its parentheses. This function can be
used to determine the nonnegative difference between two numbers.
Examples
Table 159 ABS Function Examples
ABS(5) 5
ABS(-5) 5
ABS(100-50) 50
ABS(50-100) 50
282
Control-M/Analyzer User Guide
CALCDATE: Functions
Calculates a date by adding or subtracting the number of days in the second argument to or from the
date in the first argument.
Figure 131 CALCDATE Function Format
Syntax
CALCDATE(argument1,argument2)
where
General Information
The CALCDATE function provides arithmetic capabilities for date operations. Days can be added or subtracted to the
specified date. The returned date is in yymmdd format.
Examples
Table 160 CALCDATE Function Examples
CALCDATE(000505,5) 0090510
CALCDATE(000510,-5) 000505
CALCDATE(001231,1) 010101
CALCDATE(001001,-30) 000901
CALCDATE(001231,13) 010113
283
Control-M/Analyzer User Guide
CONVDATE: Functions
Modifies a date format. The function has three arguments: an AutoEdit variable containing the date to be
modified, a mask specifying the input format, and a mask specifying the output format.
Figure 132 CONVDATE Function Format
Syntax
CONVDATE(date,'format-in','format-out')
In this syntax
date is a AutoEdit variable containing the source date to be converted.
format-in is the maximum 8 character input date mask. The day, month, and year are represented by
MM, DD, and YY, respectively, separated by the actual symbols used in the input. For example,
‘DD/MM/YY’.
format-out is the maximum 8-character output date mask. The day, month, and year are represented
by DD, MM, and YY, respectively, separated by the symbols desired in the output. For example,
‘YY.MM.DD’.
General Information
The CONVDATE function returns a date in the specified output format. It is not necessary for the input
and output formats to contain the same elements. For example, the output format may consist of month
and year even though the input contains year, month, and day. Conversely, if the output format consists
of day, month and year, but the input contains only day and month, the year position in the output will
contain YY.
284
Control-M/Analyzer User Guide
Examples
Table 161 CONVDATE Function Examples
CONVDATE('30/05/00','DD/MM/YY','MM/DD/YY') 05/30/00
CONVDATE('30/05/00','DD/MM/YY','YY/MM/DD') 00/05/30
CONVDATE('30/05/00','DD/MM/YY','MM.DD.YY') 05.30.00
CONVDATE('30/05/00','DD/MM/YY','YY-MM-DD') 00-30-05
CONVDATE('30/05/00','MM/YY','YY-DD-MM') 05-DD-30
CONVDATE('30/05/00','YY','YY-DD-MM') 30-DD-MM
CONVDATE('30/05/00','DD/MM/YY','MM-YY') 05-00
285
Control-M/Analyzer User Guide
DATASTAMP: Functions
Returns the unique identifier of a data source specified by a previously executed EXECUTE block.
Figure 133 DATASTAP Function Format
Syntax
DATASTAMP(block)
In this syntax, block is the name of an EXECUTE block in the current rule that (according to rule
processing flow order) has already been processed. The EXECUTE block can contain any ON statement
(data source) type except ON DATA.
General Information
If a unique DATASTAMP identifier was calculated and assigned to the data source, the DATASTAMP
function returns this identifier. If a datastamp was not calculated, the DATASTAMP function returns 0
(zero).
This function can be used to determine if the contents of a file have changed. After file creation, save the
value returned by the DATASTAMP function in the Control-M/Analyzer Database. Before processing the
file, compare its current datastamp value to the value stored in the Database. For information about
creating datastamps, see Datastamp Calculation (on page 442).
286
Control-M/Analyzer User Guide
Examples
Table 162 DATASTAMP Function Examples
DATASTAMP(MAINFILE) 58A1
DTAMP(MAINFILE)=DB_LASTSTAMPwhee TRUE
B_LASTSTAMP is 58A1
287
Control-M/Analyzer User Guide
DBINFO: Functions
Returns information about a Database variable.
Figure 134 DBINFO Function Format
Syntax
DBINFO(variable,type)
In this syntax
variable is the existing Control-M/Analyzer Database variable name, or an expression that resolves to
an existing Control-M/Analyzer Database variable name. Must be in quotes. Mandatory.
type is the type of information requested. Must be in single quotes. Mandatory. Available types:
• GEN – Current generation of the variable. If the variable has not been committed, –1 is returned.
• KEY – Key of the variable.
• RUNID – Run ID of the variable.
• TIME – Creation time of the variable.
• DATE – Creation date of the variable.
General Information
The DBINFO function returns a number, date, or data string, depending on the type of information
requested.
288
Control-M/Analyzer User Guide
Examples
Assume the following information for the examples below:
Table 163 Values for DBINFO Function Examples
DB_CHKDBL2 Not
committed L3 R05 14:15 05/05/00
DBINFO('DB_CHKDBL2','GEN') -1
DBINFO('DB_CHKDBL3@KM5','GEN') +1
DBINFO('DB_CHKDBL1@RRNID2','GEN') +2
DBINFO('DB_CHKDBL1@G0','KEY') VAL1
DBINFO('DB_CHKDBL1@G0','RUNID') RNID1
DBINFO('DB_CHKDBL1@G1','TIME') 10:15
DBINFO('DB_CHKDBL1@G1','DATE') 02/02/00
289
Control-M/Analyzer User Guide
DDINFO: Functions
Returns information about a data set that is referenced by a specific DD statement. The information is
obtained from the JCL.
Figure 135 DDINFO Function Format
Syntax
DDINFO(procstep,pgmstep,DD_statement,integer,type)
In this syntax
procstep is the name of the procedure step. Must be in quotes. If the step does not exist, a blank
must be specified. Mandatory.
pgmstep is the name of the program step. Must be in quotes. If the step does not exist, a blank must
be specified. Mandatory.
If the program step is the current step, character * can be specified instead of the full name of the
program step.
DD_statement is the name of the DD statement. Must be in quotes. Mandatory.
integer is the position of the data set as concatenated in the DD statement. If only one data set is
listed, the number 1 should be specified. Mandatory.
type is the type of information requested. Mandatory. Must be in quotes. Available types are:
• DSN—Data set name.
• MEM—Member name.
• GEN—Data set generation number.
290
Control-M/Analyzer User Guide
Example
Assume the following JCL for these examples:
Figure 136 JCL for DDINFO Function Example
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//I1 DD DSN=PROD.FILE.TEST1,DISP=SHR
//O1 DD DSN=TAPE.TEST1,DISP=(NEW,PASS),
// VOL=SER=TAPE1,UNIT=TAPE,LABEL=(1,SL)
//STEP2 EXEC CONTROLB,RULE=RULE1
//TSTDSN1 DD DSN=M01.EXAMP.LIBR,DISP=SHR
// DD DSN=M02.ISPF.ISPPROF(MEMNAME),
// DISP=SHR
// DD DSN=M01.TEXT.LIBR(+1),DISP=SHR
//TSTDSN2 DD DSN=M03.TEXT.LIB1,DISP=SHR
DDINFO('*','*','TSTDSN1',2,'MEM') MEMNAME
DDINFO('*','*','TSTDSN1',1,'DSN') M01.EXAMP.LIBR
DDINFO('*','*','TSTDSN1',3,'GEN') +1
DDINFO('STEP2','*','TSTDSN2',1,'DSN') M03.TEXT.LIB1
Return Codes
The SYSRC system variable is set to one of the return codes described in Table 166.
Table 166 DDINFO Return Codes Passed to System Variable SYSRC
Code Description
8 The specified integer (data set position) exceeds the number of data
sets referenced by the specified DD statement.
291
Control-M/Analyzer User Guide
DDNUM: Functions
Returns the number of data sets concatenated in a specific DD statement. The information is obtained
from the JCL.
Figure 137 DDNUM Function Format
Syntax
DDNUM(procstep,pgmstep,DD-statement)
In this syntax
procstep is the name of the procedure step. Must be in quotes. If the step does not exist, a blank
must be specified. Mandatory.
If the procedure step is the current step, an asterisk ( * ) can be specified instead of the full name of
the procedure step.
pgmstep is the name of the program step. Must be in quotes. If the step does not exist, a blank must
be specified. Mandatory.
If the program step is the current step, an asterisk ( * ) can be specified instead of the full name of
the program step.
DD-statement is the name of the DD statement. Must be in quotes. Mandatory.
292
Control-M/Analyzer User Guide
Example
Assume the following JCL for this example:
Figure 138 JCL for DDNUM Example
// EXEC CONTROLB,RULE=RULE1
//TESTDSN DD DSN=M01.EXAMP.LIBR,DISP=SHR
// DD DSN=M02.ISPF.ISPPROF(MEMNAME),
// DISP=SHR
// DD DSN=M01.TEXT.LIBR(+1),DISP=SHR
//TSTDSN DD DSN=M03.TEXT.LIB1,DISP=SHR
DDNUM('*','*','TESTDSN') 3
293
Control-M/Analyzer User Guide
FILTER: Functions
Removes all occurrences of specified characters from a data string.
Figure 139 FILTER Function Format
Syntax
FILTER(string,filter)
In this syntax
string is the expression that evaluates to a data string. Mandatory.
filter is the expression that evaluates to a data string. Mandatory.
General Information
The FILTER function returns a data string equivalent to the original string minus occurrences of each
character in filter. FILTER works on data strings only.
294
Control-M/Analyzer User Guide
Examples
Table 168 FILTER Function Examples
FILTER('1,2,3,4,5',',') 12345
FILTER('ADM_BKP_REPTS','_') ADMBKPREPTS
FILTER(DB_EMP,DB_INITIAL) OYGODON
where DB_EMP = 'ROY R. GORDON'
and DB_INITIAL = ' R.'
295
Control-M/Analyzer User Guide
FILTERW: Functions
Removes one or several occurrences of a substring (for example, a word) from a data string.
Figure 140 FILTERW Function Format
Syntax
FILTERW(strng,substrng,firstOccur,lastOccur)
In this syntax
strng is the data string (enclosed in quotes) or variable with a value that is a string, from which an
occurrences of a substring is to be removed. Mandatory.
substrng is the data string (enclosed in quotes) or variable with a value that is a substring (that
represents a word). One or more occurrences of this substring will be removed from strng.
Mandatory.
firstOccur is an integer that represents an occurrence, or the first of several occurrences, of substrng,
that is to be removed from strng. Optional. The default value is 1.
lastOccur, in the case if firstOccur is specified, can be specified as an integer that represents the last
occurrence of the substring to be removed from strng. Optional. The default value is the first
occurrence.
General Information
The FILTERW function returns a data string equivalent to the original string minus the occurrences of a
substring, that is usually a word.
This function differs from function FILTER (described above) in that the second argument (the substring
to be removed) is treated as a unit. Characters in the second argument are only removed from the first
argument (the original string) when they occur in sequential order. Characters in the second argument
are not removed from the original string individually.
296
Control-M/Analyzer User Guide
Examples
Note: Both function FILTER and function FILTERW are illustrated to clarify the differences between them.
Table 169 FILTERW Function Examples
FILTER('TOTALS','T') OALS
FILTERW('TOTALS','T') OTALS
FILTER('TOTALS','TO') ALS
FILTERW('TOTALS','TO') TALS
FILTER('MULTIPLICATION','TI') MULPLCAON
FILTERW('MULTIPLICATION','TI',2) MULTIPLICAON
FILTERW('1-800-555-1212','-',2,3) 1-8005551212
297
Control-M/Analyzer User Guide
FIND: Functions
Returns the position of a substring within a data string.
Figure 141 FIND Function Format
Syntax
FIND (strng,substrng,occurrence)
In this syntax
strng is a data string (enclosed in quotes) or variable with a value that is a string. Mandatory.
substrng is a data string (enclosed in quotes) or variable with a value that is a string. strng is
searched for an occurrence of substrng. Mandatory.
occurrence is an integer, or a Control-M/Analyzer variable containing an integer value, representing
the occurrence of substrng that should be located. Optional. If occurrence is not specified, the
position of the first occurrence is returned.
General Information
Returns the starting position of substrng within strng, or 0 if substrng is not found within strng.
298
Control-M/Analyzer User Guide
Examples
Table 170 FIND Function Examples
FINDCH: Functions
Returns the starting position in a data string of the first occurrence of any one of the characters specified
in a list of characters.
Figure 142 FINDCH Function Format
Syntax
FINDCH(inputString,charList)
where
inputString is a data string (enclosed in quotes) or variable with a value that is a string, in that the
first occurrence of a character (in the string charList) is to be located. Mandatory.
charList is a character string (enclosed in quotes) or variable with a value that is a string, the first
occurrence of any character of which is to be located in inputString. Mandatory.
General Information
If none of the characters in charList occurs in inputString, 0 (zero) is returned.
299
Control-M/Analyzer User Guide
Examples
Table 171 FINDCH Function Examples
FINDCH('123','21') 1
FINDCH('S,M,L,XL','LZ') 5
FINDCH('1-800-555-1212','34679') 0
GETJUL: Functions
Returns the Julian calendar date of its date argument.
Figure 143 GETJUL Function Format
Syntax
GETJUL(date)
General Information
The GETJUL function returns a numeric value that is the Julian calendar date that corresponds to the date
argument.
300
Control-M/Analyzer User Guide
Examples
Table 172 GETJUL Function Examples
GETJUL(000201) 32
GETJUL(000101) 1
GETJUL(001231) 366
301
Control-M/Analyzer User Guide
GETWDAY: Functions
Returns an integer from 0 through 6 indicating the day of the week of its date argument.
Figure 144 GETWDAY Function Format
Syntax
GETWDAY(date)
General Information
The GETWDAY function returns a number representing the day of week on which the date in the date
argument falls. The first day of the week, as specified in the SWEEK IOA installation parameter, is
designated by the number 1. The last day of the week is designated by the number 0.
If the value of the SWEEK IOA installation parameter is MON (Monday), the integers 0 through 6
represent Sunday through Saturday. If the value of SWEEK is SUN (Sunday), the integers 0 through 6
represent Saturday through Friday.
302
Control-M/Analyzer User Guide
Example
In the examples in Table 173, the first day of the week is the SWEEK IOA installation parameter default:
Monday. Therefore, Monday=1, Tuesday=2, ..., Saturday 6, Sunday=0.
Table 173 GETWDAY Function Examples
GETWDAY(001220) 3
GETWDAY(000101) 6
GETWDAY(000222) 2
GETWDAY('ABCDEF') Error
303
Control-M/Analyzer User Guide
HOWMANY: Functions
Returns the number of variables with names that match a specified pattern (mask).
Figure 145 HOWMANY Function Format
Syntax
HOWMANY(varList)
In this syntax, varList represents a set of variable names. varList can be a Local variable name, a
Database variable name, or a mask that represents several Local variable names. Must be in quotes.
Mandatory.
General Information
The HOWMANY function returns the total number of Control-M/Analyzer Local and Database variables
that match the mask specified in varList.
Mask characters are supported for Local variable names in varList. varList may contain an asterisk * (that
represents any number of characters) or a question mark ? (that represents a single character).
Mask characters are not supported for Database variables in varList.
Uncommitted Database variables that satisfy the criteria specified are considered (meaning, they are
taken into account even though they are not yet committed).
304
Control-M/Analyzer User Guide
Examples
Assume the following for the examples below:
Table 174 Values for HOWMANY Function Examples
A1 2,
A2 2.5,
A3B 3,
DB_CHKDBL@G0 03 DATA1
DB_CHKDBL@G1 01 TESTDATA
DB_CHKDBL@G2 11 ABCD
DB_CHKDBL@G3 01 2
HOWMANY('A*') 3
HOWMANY('A?') 2
HOWMANY('DB_CHKDBL') 5
HOWMANY('DB_CHKDBL@K01') 3
305
Control-M/Analyzer User Guide
INT: Functions
Returns the integer portion of its argument.
Figure 146 INT Function Format
Syntax
INT(value)
General Information
The fractional portion of the number is ignored. The integer portion of the number is returned.
Examples
Table 176 INT Function Examples
INT(3.65) 3
INT(0.1111) 0
INT(.123) 0
INT(1977.65) 1977
INT('Rule') Error
INT(21) 21
306
Control-M/Analyzer User Guide
ISDSN: Functions
Determines if a data set exists.
Figure 147 ISDSN Function Format
Syntax
ISDSN(dataset)
Examples
Assume the following for the examples below:
307
Control-M/Analyzer User Guide
APPL1.EMPLOYEE.FILE Exists
ISMEM: Functions
Determines if a specified member exists in a specified library.
Figure 148 ISMEM Function Format
Syntax
ISMEM(library,member)
where
library is a library name. Must be in quotes. Mandatory.
member is a member name. Must be in quotes. Mandatory.
308
Control-M/Analyzer User Guide
General Information
The ISMEM function returns the value TRUE if the member exists in the library and the value FALSE if
either the library does not exist or the member does not exist in the library.
Examples
Table 179 Values for ISMEM Function Examples
Member Exists in
Library Member Library Exists? Library?
APPL1.PYROL.FILE No
ISMEM('CTM.PROD.SYMBOLS','TAPES') True
ISMEM('CTM.PROD.SYMBOLS','BOOKS') False
ISMEM('APPL1.PYROL.FILE','SALARIES') False
309
Control-M/Analyzer User Guide
ISNUMBER: Functions
Determines if its argument is numeric.
Figure 149 ISNUMBER Function Format
Syntax
ISNUMBER(argument)
General Information
The ISNUMBER function returns TRUE if argument is numeric and FALSE if argument is not numeric.
310
Control-M/Analyzer User Guide
Examples
Table 181 ISNUMBER Function Examples
ISNUMBER(100) TRUE
ISNUMBER(DB_CURRENT_EMP) FALSE
where DB_CURRENT_EMP=‘Barbara
Gordon’
ISNUMBER(DB_CURR_TOTAL) TRUE
where DB_CURR_TOTAL=550
ISNUMBER('2.45') TRUE
311
Control-M/Analyzer User Guide
ISSYSOUT: Functions
Determines if a sysout exists.
Figure 150 ISSYSOUT Function Format
Syntax
ISSYSOUT('ddname','procstep','pgmstep','jobname')
In this syntax
ddname is the name of the DD statement that references the sysout. Must be in quotes. Mandatory.
procstep is the name of the procedure step that produced the sysout. Must be in quotes. Optional.
pgmstep is the name of the program step that produced the sysout. Must be in quotes. Optional.
jobname is the name of the job that produced the sysout. Must be in quotes. Optional. If JOBNAME is
not specified, the default value is the current job.
The ISSYSOUT function returns the value TRUE if the sysout exists and the value FALSE if the sysout does
not exist. This enables you to avoid an attempt to access a nonexistent sysout and thereby avoid an
abend with the return code 4091 when the sysout is not found on spool.
The four arguments are identified by position. A blank argument is represented by one or more blanks
enclosed by quote marks.
312
Control-M/Analyzer User Guide
Examples
Assume the following for the example in Table 182.
Table 182 Values for ISSYSOUT Function Examples
Procedure
DD Statement Step Program Step Job Name Status
Function Returns
ISSYSOUT('DDINVT2','PROCOUT','PGMSTP3','MNTHLY') False
313
Control-M/Analyzer User Guide
ISVAR: Functions
Determines if its argument exists as a Control-M/Analyzer Local or Database variable.
Figure 151 ISVAR Function Format
Syntax
ISVAR(varName)
General Information
ISVAR returns TRUE if varName is an existing Control-M/Analyzer Local or Database variable and FALSE if
no Local or Database variable exists with the name varName.
314
Control-M/Analyzer User Guide
Examples
Table 184 ISVAR Function Examples
ISVAR(INVTOT) TRUE
where INVTOT is an existing
Control-M/Analyzer local variable.
ISVAR(TOTAL) FALSE
where TOTAL is not an existing
Control-M/Analyzer local variable.
ISVAR(DB_QC.TOTAL) TRUE
where DB_QC.TOTAL is defined in the
Control-M/Analyzer Database.
ISVAR(DB_QC.TOTAL@KJAN) TRUE
where the Database variable TOTAL of
group QC has a generation with a user
key of JAN.
315
Control-M/Analyzer User Guide
LENGTH: Functions
Determines the number of characters in a data string.
Figure 152 LENGTH Function Format
Syntax
LENGTH(strng)
General Information
The LENGTH function returns a number that indicates the number of characters, including spaces, in
strng.
Examples
Table 185 LENGTH Function Examples
LENGTH('AB') 2
LENGTH('TOTALS: $ 15000') 16
LENGTH(DB_CURRENT_EMP) 14
where DB_CURRENT_EMP='BARBARA GORDON'
316
Control-M/Analyzer User Guide
LINECOUNT: Functions
Returns the number of lines of a data source specified by a previously executed EXECUTE block.
Figure 153 LINECOUT Function Format
Syntax
LINECOUNT(executeBlock)
In this syntax, executeBlock is the name of an EXECUTE block in the current rule that (according to rule
processing flow order) has already been processed. The ON statement in the EXECUTE block can specify
any data source type except DATA.
General Information
The LINECOUNT function returns the number of lines that exist in the data source processed by the
specified EXECUTE block.
The number of lines is counted by Control-M/Analyzer when the EXECUTE block is executed. The line
count of data sources specified by EXECUTE blocks that have not yet been processed is not known.
Therefore, LINECOUNT returns 0 if the specified EXECUTE block has not been processed.
Example
Table 186 LINECOUNT Function Example
LINECOUNT(lastBlock) 500
where lastBlock had 500 lines when last executed during
the rule invocation.
317
Control-M/Analyzer User Guide
MAX: Functions
Returns the largest value in a list of numbers.
Figure 154 MAX Function Format
Syntax
MAX(number1,number2,...,number-n)
In this syntax, number1,number2,...,number-n are numbers, variables with values that are numeric, or
Control-M/Analyzer expressions that resolve to numeric values. At least two numbers must be specified.
General Information
An unlimited number of numbers can be specified.
318
Control-M/Analyzer User Guide
Examples
Assume the following for the examples below:
Table 187 Values for MAX Function Examples
Variable Value
SALARY_1 5660
SALARY_2 7122.50
MAX(3,9,4.25) 9
MAX(5200,SALARY_1,SALARY_2) 7122.50
319
Control-M/Analyzer User Guide
MEMLINES: Functions
Returns the number of lines in a specified member.
Figure 155 MEMLINES Function Format
Syntax
MEMLINES(library,member)
In this syntax
library is a library name. Mandatory.
member is a member name. Mandatory.
General Information
The MEMLINES function returns the number of lines that a member contains. The number of lines is
obtained from the ISPF statistics SIZE parameter. The input arguments can be variables or literals,
meaning, character strings enclosed by apostrophes (single quotes).
An error message is generated if the library or member does not exist.
320
Control-M/Analyzer User Guide
Example
Assume that only the following lines exist in member RUNJOB of the APPL.PROD.JCL library:
Figure 156 Sample Member RUNJOB for MEMLINES Function Example
000001 *************************************************
000002 * *
000003 * THIS IS A SAMPLE OF THE TEXT IN A MEMBER. *
000004 * *
000005 * THIS TEXT IS BEING USED TO ILLUSTRATE *
000006 * THE USAGE OF FUNCTION MEMLINES. *
000007 * *
000008 *************************************************
MEMLINES('APPL.PROD.JCL','RUNJOB') 8
321
Control-M/Analyzer User Guide
MIN: Functions
Returns the smallest value in a list of numbers.
Figure 157 MIN Function Format
Syntax
MIN(number1,number2,...,number-n)
In this syntax, number1,number2,...,number-n are numbers, or variables with values that are numeric, or
Control-M/Analyzer expressions that resolve to numeric values. At least two numbers must be specified.
General Information
An unlimited number of numbers can be specified.
322
Control-M/Analyzer User Guide
Examples
Assume the following for the examples below:
Table 190 Values for MIN Function Example
Variable Value
SALARY_1 5660
SALARY_2 7122.50
MIN(3,9,4.25) 3
MIN(5200,SALARY_1,SALARY_2) 5200
323
Control-M/Analyzer User Guide
MOD: Functions
Returns the remainder that results when its first argument is divided by its second argument.
Figure 158 MOD Function Format
Syntax
MOD(integer1,integer2)
In this syntax
integer1 is the dividend (numerator to be divided by integer2).
integer2 is the divisor (denominator to divide into integer1).
General Information
The MOD function works on integers only. MOD divides integer1 by integer2. The remainder resulting
from the division is returned by MOD.
324
Control-M/Analyzer User Guide
Examples
Table 192 MOD Function Examples
MOD(7,2) 1
MOD(6,2) 0
MOD(2,6) 2
MOD(100,10) 0
MOD(60,6) 0
MOD('ABC',3) Error
MOD('333','3') 0
MOD(4.4,2) Error
325
Control-M/Analyzer User Guide
NEXTVAR: Functions
Returns the next variable in a specified set of Local or Database variables, thus enabling
Control-M/Analyzer to scan the entire set.
Figure 159 NEXTVAR Function Format
Syntax
NEXTVAR(varSet,startVar)
In this syntax
varSet is an expression that resolves to a string that represents a set of variables. varSet can be a
Database variable or a mask for a collection of Local variables. Mandatory.
startVar is an expression that resolves to a string that represents the name of the Local variable or
Database variable generation from which scanning should start. Can be blank. Optional.
General Information
Local variables are retrieved in alphabetical order. Database variables are retrieved by generation, from
the most recent to the oldest.
If startVar is blank, NEXTVAR returns the name of the first variable in the set.
If startVar is the name of a variable in the set, NEXTVAR returns the name of the next variable in the
set. For committed Database variables, the generation is appended to the name.
If startVar is the name of the last variable in the set, NEXTVAR returns a blank and the SYSRC System
variable is set to 4.
• Mask characters are supported for Local variable names in varset. varset may contain an asterisk
* (that represents any number of characters) or a question mark ? (that represents a single
character).
• Mask characters are not supported for Database variables in varset.
326
Control-M/Analyzer User Guide
• Uncommitted Database variables that belong to the set are returned before committed Database
variables in the same set.
Return Codes
The SYSRC system variable is set to one of the following return codes:
Table 193 NEXTVAR Return Codes Passed to System Variable SYSRC
Code Description
0 Successful execution.
Examples
For the examples below, four Local variables and four generations of a Database variable were created in
the order listed:
Table 194 Values for NEXTVAR Function Examples
Variable Run ID
TOTALD40
TOTALA20
TOTALZ18
TOTALC18
DB_DEMO.CHKDBL@G2 1
DB_DEMO.CHKDBL@G1 2
DB_DEMO.CHKDBL@G0 1
327
Control-M/Analyzer User Guide
NEXTVAR('TOTAL*') 'TOTALA20'
NEXTVAR('TOTAL*','TOTALA20') 'TOTALC18'
NEXTVAR('TOTAL*','TOTALC18') 'TOTALD40'
NEXTVAR('TOTAL*','TOTALD40') 'TOTALZ18'
NEXTVAR('DB_CHKDBL','DB_CHKDBL') 'DB_CHKDBL@G0'
NEXTVAR('DB_CHKDBL','DB_CHKDBL@G0') 'DB_CHKDBL@G1'
NEXTVAR('DB_CHKDBL','DB_CHKDBL@G1') 'DB_CHKDBL@G2'
NEXTVAR('DB_CHKDBL@R1','DB_CHKDBL') 'DB_CHKDBL@G0'
NEXTVAR('DB_CHKDBL@R1','DB_CHKDBL@G0') 'DB_CHKDBL@G2'
328
Control-M/Analyzer User Guide
NOT: Functions
Negates the value of its logical argument.
Figure 160 NOT Function Format
Syntax
NOT(expression)
General Information
The NOT function returns the logical value opposite to the logical value specified by expression.
Examples
Table 196 NOT Function Examples
NOT(1) FALSE
NOT(0) TRUE
NOT(5>10) TRUE
NOT(5<10) FALSE
329
Control-M/Analyzer User Guide
POW: Functions
Calculates the result of raising its first argument to the power of its second argument.
Figure 161 POW Function Format
Syntax
POW(val,pow)
In this syntax
General Information
The POW function returns the result of raising val to the power specified by pow.
Examples
Table 197 POW Function Examples
POW(3,2) 9
POW(2,3) 8
POW(0,1) 0
POW(1,0) 1
POW(8,0) 1
POW(0,0) 1
POW(2,-3) 0.125
330
Control-M/Analyzer User Guide
REPLACE: Functions
Replaces one character string with another.
Figure 162 REPLACE Function Format
Syntax
REPLACE(strng,string1,string2,firstOccur,lastOccur)
where
strng is a character string (or variable with a value that is a character string). Mandatory.
string1 is a character string (or variable with a value that is a character string) that is to be replaced
by string2 in strng. Mandatory.
string2 is a character string (or variable with a value that is a character string) that is to replace
string1 in strng. Mandatory.
firstOccur is an Integer value that represents an occurrence, or the beginning of a range of
occurrences, of string1 that is to be replaced by string2. Optional. When firstOccur is omitted, the first
occurrence of string1 is replaced by string2.
lastOccur, if firstOccur has been specified, can be specified as an integer that represents the last
occurrence in a range of occurrences of string1 that is to be replaced by string2. Optional. The default
value is the value of argument firstOccur.
331
Control-M/Analyzer User Guide
Examples
Assume INFO is a variable that contains the string TESTDATA.
Table 198 INFO Function Examples
REPLACE(INFO,'A','F') TESTDFTA
REPLACE(INFO,'A','B',2) TESTDATB
REPLACE(INFO,'A','B',1,2) TESTDBTB
REPLACE(INFO,'A','FF',1,3) TESTDFFTFF
REPLACE(INFO,'DATA','XXXXX') TESTXXXXX
332
Control-M/Analyzer User Guide
SQRT: Functions
Returns the square root of its numeric argument.
Figure 163 SQRT Function Format
Syntax
SQRT(value)
General Information
The SQRT function returns the square root of value. If value is negative, SQRT returns zero.
333
Control-M/Analyzer User Guide
Examples
Table 199 SQRT Function Examples
SQRT(9) 3
SQRT(3) 1.732
SQRT(48*3) 12
SQRT('Rule') Error
SQRT(-9) 0
SQRT(1.25) 1.118
SUBSTR: Functions
Extracts part of a data string.
Figure 164 SUBSTR Function Format
Syntax
SUBSTR(pos,len,strng)
In this syntax
pos is a number representing the starting character position from which to extract. Mandatory.
len is a number representing the number of characters to extract. Mandatory.
strng is an expression that evaluates to a data string. Mandatory.
334
Control-M/Analyzer User Guide
General Information
The SUBSTR function extracts the number of characters in its second argument (len) from the data string
in its third argument (strng) beginning with the character position in its first argument (pos). SUBSTR
works on data strings only.
The first position in the string is position 1. Use the LENGTH function to determine the last position in the
string.
Examples
Table 200 SUBSTR Function Examples
SUBSTR(2,3,'ABCDEFG') 'BCD'
335
Control-M/Analyzer User Guide
SUM: Functions
Calculates the sum of the variables with names that match a specified pattern.
Figure 165 SUM Function Format
Syntax
SUM(varList)
where varList represents a set of variables. varList can be a Local variable, a Database variable, or a mask
that represents several Local variables. Must be in quotes. Mandatory.
General Information
The SUM function calculates the sum of the values of the variables with names that match the pattern.
The value in each variable must be numeric.
Mask characters are supported for Local variable names in varlist. varlist can contain an asterisk * (that
represents any number of characters) or a question mark ? (that represents a single character).
Mask characters are not supported for Database variables in varlist.
Uncommitted Database variables that satisfy the criteria specified are considered (meaning, even though
they are not yet committed, they are included in the sum).
Return Codes
The SYSRC System variable is set to one of the following return codes:
336
Control-M/Analyzer User Guide
Code Description
Examples
Assume the following variables were assigned values by statement DO SET:
Table 202 Values for SUM Function Examples
A1 2
A2 3
A3B 3
A1X 3
A2X 1
DB_CHKDBL@G0 1
DB_CHKDBL@G1 0
DB_CHKDBL@G2 1
DB_CHKDBL@G3 2
DB_CHKDBL 3
(not yet committed)
SUM('A*') 12
SUM('A?') 5
SUM('A?X') 4
SUM('DB_CHKDBL') 7
337
Control-M/Analyzer User Guide
TOLER: Functions
Determines if the percentage difference between two numbers is less than or equal to the specified
tolerance percentage.
Figure 166 TOLER Function Format
Syntax
TOLER(value1,value2,percent)
In this syntax
value1 is a base value.
value2 is a value to be compared with value1.
pct is the maximum percentage tolerance.
General Information
The TOLER function calculates the percentage difference between value1 and value2 (assuming value1 is
100%). The result is compared to pct. If the calculated percentage is less than or equal to pct, TOLER
returns TRUE. If the calculated percentage is more than pct, TOLER returns FALSE.
338
Control-M/Analyzer User Guide
Examples
Table 204 TOLER Function Examples
TOLER(100,50,20) False
TOLER(100,80,20) True
TOLER(100,95,20) True
TOLER(100,100,0) True
TOLER(100,150,40) False
TOLER(150,100,40) True
TOLER(2000,2005,0.5) True
339
Control-M/Analyzer User Guide
TOLOWER: Functions
Converts a data string to lowercase characters.
Figure 167 TOLOWER Function Format
Syntax
TOLOWER(strng)
General Information
The TOLOWER function returns a data string equivalent to the lowercase characters of strng. TOLOWER
works on data strings only.
Examples
Table 205 TOLOWER Function Examples
340
Control-M/Analyzer User Guide
TOUPPER: Functions
Converts a data string to uppercase characters.
Figure 168 TOUPPER Function Format
Syntax
TOUPPER(strng)
General Information
The TOUPPER function returns a data string equivalent to the uppercase characters of strng. TOUPPER
works on data strings only.
Examples
Table 206 TOUPPER Function Examples
341
Control-M/Analyzer User Guide
TRIMB: Functions
Removes (trims) trailing blanks from a data string.
Figure 169 TRIMB Function Format
Syntax
TRIMB(strng)
General Information
The TRIMB function returns a data string equivalent to strng without trailing blanks. TRIMB works on data
strings only.
Examples
Table 207 TRIMB Function Examples
LENGTH(TRIMB('ANALYZER ')) 8
342
Control-M/Analyzer User Guide
TRIML: Functions
Removes (trims) leading blanks from a data string.
Figure 170 TRIML Function Format
Syntax
TRIML(strng)
General Information
The TRIML function returns a data string equivalent to strng without leading blanks. TRIML works on data
strings only.
Examples
Table 208 TRIML Function Examples
LENGTH(TRIML(' ANALYZER')) 8
343
Control-M/Analyzer User Guide
WORD: Functions
Returns the nth word in a text string. Delimiters can be specified as word separators.
Figure 171 WORD Function Format
Syntax
WORD(strng,delimiter,wordNum)
In this syntax
strng is a data string (enclosed in quotes) or a variable with a value that is a string. Mandatory.
delimiter is a set of characters, enclosed in quotes, each of which is used as a delimiter. Words are
the strings located from the start of strng to the first delimiter, or between two delimiters, or from the
last delimiter to the end of strng. Mandatory.
wordNum is a number that represents the position of a word in strng. For example, 3 represents the
third word in the string. Mandatory.
General Information
The WORD function counts the words in the string. More than one delimiter, or type of delimiter, is
allowed. The function returns the word with a position in the string corresponding to wordNum (for
example, the first, fifth, or tenth word, if wordNum has the value of 1, 5, or 10, respectively).
If the specified delimiters do not exist, the entire string is considered one word.
If the specified word does not exist (for example, the fifth word was requested in a four word string), a
null string (a string of length zero) is returned and the SYSRC system variable is set to 4. The result can
be checked with the SYSNULL system variable (described in "SYSNULL" in Summary of System Variables
(on page 262)). The CTB295W warning message is issued.
Note: Leading blanks are ignored even if a blank is specified as the delimiter.
344
Control-M/Analyzer User Guide
Examples
Assume the following for the examples below:
Table 209 Values for WORD Function Examples
CHANGE_AROUND CHANGE,THIS,SENTENCE,AROUND
WORD(CHANGE_AROUND,',',4) AROUND
345
Control-M/Analyzer User Guide
WORDNUM: Functions
Returns the number of words in a string.
Figure 172 WORDNUM Function Format
Syntax
WORDNUM(strng,delimiter)
In this syntax
strng is a data string (enclosed in quotes) or a variable with a value that is a string. Mandatory.
delimiter is a set of characters, enclosed in quotes, each of which is used as a delimiter. Words are
substrings located from the start of the string to the first delimiter, between two delimiters, and from
the last delimiter to the end of the string. Mandatory.
General Information
The WORDNUM function returns the number of words in the string. More than one delimiter, or type of
delimiter, is allowed.
If no specified delimiter exists, the entire sentence is considered one word.
Note: Leading blanks are ignored even if a blank is specified as the delimiter.
Examples
Assume the following for the examples below:
346
Control-M/Analyzer User Guide
CHANGE_AROUND CHANGE,THIS,SENTENCE,AROUND
WORDNUM(SENTENCE_CHECKED,' ') 4
WORDNUM(CHANGE_AROUND,',') 4
WORDNUM(CHANGE_AROUND,' ') 1
347
5
5
Rule Definition
Rule Definition (on page 349)
EXECUTE Block Structure Overview (on page 351)
Control-M/Analyzer Variables (on page 351)
Rule Parameters – Summaries (on page 352)
Parameter and Statement Descriptions (on page 357)
ALWAYS: Data Identification Statement (on page 358)
DESC: Basic Rule Parameter (on page 360)
DO Statement: Automated Balancing Statement (on page 361)
DO ADDSYM: Automated Balancing Statement (on page 364)
DO BLOCK: Automated Balancing Statement (on page 368)
DO CALLUSER: Automated Balancing Statement (on page 371)
DO COMMIT: Automated Balancing Statement (on page 373)
DO COND: Automated Balancing Statement (on page 378)
DO EXIT: Automated Balancing Statement (on page 381)
DO EXTRACT: Automated Balancing Statement (on page 382)
DO GETMEM: Automated Balancing Statement (on page 397)
DO GOTO: Automated Balancing Statement (on page 399)
DO MAIL: Automated Balancing Statement (on page 402)
DO PRINT: Automated Balancing Statement (on page 405)
DO PUTMEM: Automated Balancing Statement (on page 412)
DO REMARK: Automated Balancing Statement (on page 414)
DO RULE: Automated Balancing Statement (on page 416)
DO SET: Automated Balancing Statement (on page 418)
DO SHOUT: Automated Balancing Statement (on page 421)
DO SYSOUT: Automated Balancing Statement (on page 425)
DO TERMINAT: Automated Balancing Statement (on page 428)
EXECUTE: Data Selection Statement (on page 430)
GROUP: Data Selection Statement (on page 433)
IF: Data Selection Statement (on page 435)
348
Control-M/Analyzer User Guide
Rule Definition
The various selection criteria and instructions defined in each Control-M/Analyzer rule are called rule
parameters. Rule parameters are grouped together logically to form subunits called EXECUTE blocks.
General parameters and a series of EXECUTE blocks combine to form a rule definition.
This chapter is comprised of:
an EXECUTE block structure overview
a Control-M/Analyzer variables overview
detailed descriptions of all parameters and their specific uses
BMC recommends that all Control-M/Analyzer users read the overview of the Rule Definition screen and
the description of the Online Scheduling facility in Online Facilities (on page 58) before reading this
section.
349
Control-M/Analyzer User Guide
Rule Definition parameters are defined through the Online facility using pre-formatted, "fill-in-the-blank"
screens. Rule definitions may also be created and modified using a standard editor and
Control-M/Analyzer Rule Definition language commands. This method is discussed in Rule Definition Using
an Editor (on page 507).
Figure 173 Control-M/Analyzer Rule Definition Screen
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP ACCT_INV
UPDATED 04/04/00 - 15:25:54 BY M43
DESC REORDER INVENTORY ITEM CHR001 IF NECESSARY
OPTIONS
===========================================================================
/* INITIALIZATION OF THE MINIMUM AMOUNT REQUIRED ON-HAND FOR
/* INVENTORY ITEM CHR001.
EXECUTE SETUP UPON C
ON DATA
ALWAYS
DO SET = MIN_CHR001=100 C
===========================================================================
/* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
/* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = CHR001
PLEASE FILL IN RULE DEFINITION. 09.25.30
All rule definitions are stored as members in standard user libraries. One member must exist for each rule,
and the member name is identical to the rule name. Maintenance within the library and management of
the operating instructions are performed using the Online Rule Definition facility or a standard editor.
When defining rule definitions using the Online facility, definitions can be modified by entering the
Control-M/Analyzer Edit Environment. ISPF-like line commands may be specified to copy, delete, insert,
move, and repeat lines of the definition. For additional information and examples refer to A Editing Rule
Definitions in the IOA Edit Environment (on page 660).
There are four types of rule parameters:
Basic Rule parameters
Data Selection statements (ON statements)
Data Identification statements (WHEN, ALWAYS, and IF statements)
Automated Balancing statements (DO statements)
This chapter first describes the EXECUTE block structure, followed by an overview of Control-M/Analyzer
variables, and then presents a quick summary of the rule parameters in each of the four groups listed
above.
The summary is followed by detailed descriptions of each parameter and statement in alphabetical order.
Subparameters are presented in the order of their fields on the screen.
The detailed descriptions of the parameters are followed by an overview and quick reference guide for
creating and modifying rules using a standard editor. The guide contains the syntax and options of each
parameter. Examples are also provided.
350
Control-M/Analyzer User Guide
A rule can contain an unlimited number of EXECUTE blocks. The EXECUTE blocks are processed
sequentially within a rule, unless specified otherwise by DO GOTO or DO BLOCK statements.
For additional information about EXECUTE blocks, see EXECUTE Block Structure Overview (on page 37).
Control-M/Analyzer Variables
Control-M/Analyzer provides Database, AutoEdit, Local, and System types of variables for storing values.
For a comprehensive description of all variable types, see Chapter 3, "Control-M/Analyzer Variables".
Control-M/Analyzer Database variables are unique to Control-M/Analyzer. Control-M/Analyzer rules
can initialize variables and store these values in the Database for future use.
AutoEdit variables are stored in AutoEdit members and can be subsequently used in other rules or by
other INCONTROL products.
Local variables can be used throughout the execution of a rule but are not available after rule
termination.
System variables store values that are automatically defined by the system. These variables can be
used throughout the execution of a rule but are not available after rule termination.
The DO EXTRACT statement extracts data from a sysout or file and stores the data in a variable.
The DO SET statement sets the value of a variable in the form of a Control-M/Analyzer expression.
IF statements and the UPON parameter can contain Control-M/Analyzer variables in expression format.
For additional information about expressions, see Expressions and Functions (on page 269).
351
Control-M/Analyzer User Guide
Parameter Description
UPDATED ... BY Date of last update of the rule and last user to update the rule.
352
Control-M/Analyzer User Guide
Statement Description
EXECUTE Statement Provides a name for the EXECUTE block and determines whether
the block is executed based on conditional UPON criteria.
ON Statement Specifies the source of data that the rule attempts to balance.
ON DSN For Control-D and Control-V users only: Compressed Dataset Access
Method (CDAM) files.
ON SYSDATA For Control-M and Control-M/Restart users only: The three job
sysout datasets, referred to as SYSDATA,a passed to
Control-M/Analyzer from Control-M when Control-M analyzes a job
run.
An EXECUTE block is comprised of one Data Selection statement (ON block), one or more Data
Identification statements (WHEN, ALWAYS, or IF), and a series of DO statements for each Data
Identification statement.
Different Data Identification statements (WHEN, ALWAYS, and IF) are displayed based on which ON
statement is used.
353
Control-M/Analyzer User Guide
354
Control-M/Analyzer User Guide
Statement Description
355
Control-M/Analyzer User Guide
Statement Description
DO COMMIT Controls the method that Database variables are written to the
Control-M/Analyzer Database.
DO GOTO Provides "GO TO" logic by executing the IF/ALWAYS block that
begins with the specified LABEL.
DO TERMINAT Terminates the rule and specifies the result of the data balancing
effort (for example, OK, TOLER, NOTOK, or ABEND).
356
Control-M/Analyzer User Guide
357
Control-M/Analyzer User Guide
Optional. When ON DATA is specified and Enter is pressed, the ALWAYS statement can be specified in
the field that is opened on the screen. When ALWAYS (or its abbreviation A) is specified and Enter is
pressed, the following fields are displayed:
Table 217 ALWAYS Statement Fields
Field Description
General Information
Available only when ON DATA is specified.
The DO statements after the ALWAYS statement are always executed.
The LABEL parameter is used as a reference point for flow processing (branching). LABEL is used in
conjunction with the DO GOTO statement. When specified, DO GOTO passes processing control to the
matching LABEL. See DO GOTO in this chapter for additional information.
358
Control-M/Analyzer User Guide
Example
Statement ALWAYS is commonly used for initialization and preparatory actions that should be performed
before processing begins. In this example, statement ALWAYS:
Appears in the first EXECUTE block of the rule definition.
Initializes counters that are used later in this rule definition.
Prepares header lines for the report that the rule definition produces.
Figure 177 ALWAYS Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M18B GROUP ADMIN
UPDATED 04/04/00 - 15:30:05 BY M18B
DESC CHECK EMPLOYEES REPORT FOR BALANCING
OPTIONS
===========================================================================
EXECUTE PREPARE UPON C
ON DATA
LABEL: INIT
ALWAYS
DO SET = CNTR=0 C
DO SET = ERR=0 C
DO PRINT = UNREASONABLE SICK/VACATION DAYS F C
DO PRINT = ================================= F C
DO PRINT = +--+---------------+------+-----+ F C
DO PRINT = | | NAME | SICK | VAC | F C
DO PRINT = +--+---------------+------+-----+ F C
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE INPUT UPON C
PLEASE FILL IN RULE DEFINITION. 18.31.58
359
Control-M/Analyzer User Guide
General Information
A rule description can be specified in any language. It is used as an internal help facility, assisting the
user in documenting the rule under Control-M/Analyzer.
360
Control-M/Analyzer User Guide
Examples
Figure 179 DESC Parameter Format
LIBRARY : CTB.PROD.RULES RULE : CHECKCUR
COMMAND ===> SCROLL===> CRSR
------------------------------------------------------------------------------+
OWNER M55 GROUP CURRENCY
UPDATED 04/04/00 - 09:18:35 BY M55A
DESC CHECK BALANCING OF BANK'S FOREIGN CURRENCY INVESTMENTS
OPTIONS
===========================================================================
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME REPORT JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 020 - 030 COL 001 - 132 STOP AND/OR
STRING = NOT BALANCED
DO SHOUT TO OPER URGENCY R
= FOREIGN CURRENCY REPORT NOT BALANCED !!!
DO TERMINAT = NOTOK COD 1001
===========================================================================
EXECUTE UPON C
ON
====== >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
Action Description
361
Control-M/Analyzer User Guide
Action Description
DO GOTO Provides "go to" logic by executing the IF/ALWAYS block that begins
with the specified LABEL.
DO TERMINAT Terminates the rule and specifies the result of the data balancing
effort, such as OK, TOLER, NOTOK, or ABEND.
General Information
DO statements are associated with a preceding ALWAYS, WHEN, IF or ELSE statement (described in
Command Reference (on page 511)). The implied relationship is:
362
Control-M/Analyzer User Guide
Statement Description
IF, ELSE If IF or ELSE statement criteria are satisfied, perform all actions
specified in the appropriate DO statements.
WHEN If the WHEN string is found, perform all actions specified in the DO
statements.
363
Control-M/Analyzer User Guide
Optional. Type the word ADDSYM (or its abbreviation A) next to the DO in the Rule Definition screen.
When Enter is pressed, the = prompt and the following fields are displayed:
Table 220 ADDSYM Statement Fields
Field Description
LIBSYM Name of the library (44 character maximum) that contains (or will
contain) the AutoEdit member.
364
Control-M/Analyzer User Guide
General Information
AutoEdit variables can be used to pass information between Control-M/Analyzer rules and between
Control-M/Analyzer and other INCONTROL products (for example, Control-M, Control-D, Control-O).
The following statements access AutoEdit members:
DO GETMEM enables subsequent actions of the rule to access (through AutoEdit statements or DO
SET statements) AutoEdit variables contained in the specified AutoEdit member.
DO ADDSYM adds an AutoEdit variable to an AutoEdit member.
DO PUTMEM writes the AutoEdit member back to its library for future use.
Using DO ADDSYM, a new AutoEdit variable is associated with (added to) the specified AutoEdit member.
The initial value of the variable is null.
An AutoEdit variable can be referred to by a rule only if:
The variable has been read previously by statement DO GETMEM, or
Statement DO ADDSYM has been performed for this variable.
All AutoEdit variables must be associated with an AutoEdit member (by one of the two methods listed
above) before the variable can be accessed.
If a rule refers to an AutoEdit variable through statement DO ADDSYM, the variable is created even if the
associated AutoEdit member MEM was not read by statement DO GETMEM. However, statement DO
PUTMEM fails and a runtime error occurs if the AutoEdit member specified in the MEM parameter exists in
the library specified in LIBSYM and that member was not previously read by statement DO GETMEM.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be
embedded in the LIBSYM and MEM parameters of statement DO ADDSYM. The variables are resolved
(replaced) at the time of rule execution. For additional information on AutoEdit processing, see
Control-M/Analyzer Variables (on page 222).
For additional information, see DO GETMEM: Automated Balancing Statement (on page 397), and DO
PUTMEM: Automated Balancing Statement (on page 412).
Example
The following example uses a central bank report that lists interest rates at month-end. The last banking
day of each month is also provided in the following format:
365
Control-M/Analyzer User Guide
I N T E R E S T R A T E S A T M O N T H - E N D YEAR: 2000
The Control-M/Analyzer rule updates an AutoEdit member that contains AutoEdit variables in the following
format:
Figure 183 AutoEdit Member Updated by DO ADDSYM Statement Example
%%LAST_BANKING_DAY_0001=000131
%%LAST_BANKING_DAY_0002=000229
%%LAST_BANKING_DAY_0003=000331
%%LAST_BANKING_DAY_0004=000428
%%LAST_BANKING_DAY_0005=000531
%%LAST_BANKING_DAY_0006=000630
%%LAST_BANKING_DAY_0007=000731
%%LAST_BANKING_DAY_0008=000831
%%LAST_BANKING_DAY_0009=000929
%%LAST_BANKING_DAY_0010=001031
%%LAST_BANKING_DAY_0011=001130
%%LAST_BANKING_DAY_0012=001229
The rule adds the new AutoEdit variables to the existing AutoEdit member LSTBNKDY using statement DO
ADDSYM.
First, the new AutoEdit variable is added using statement DO ADDSYM. Afterward, this variable is set
using statement DO EXTRACT.
366
Control-M/Analyzer User Guide
367
Control-M/Analyzer User Guide
Optional. Type the word BLOCK (or its abbreviation B) next to the DO in the Rule Definition screen. When
Enter is pressed, the = prompt and the following fields are displayed:
Table 221 DO BLOCK Statement Fields
Field Description
name Name of the block to process. The block name can have a maximum
of 8 characters. The name of the block should match the block
name specified in an EXECUTE statement. Mandatory.
Note: Database variables can be embedded in the ARG parameter only if they have not yet been
committed. After a Database variable is committed, it cannot be specified in the ARG parameter.
When set to Y (Yes), the C (Continue?) field provides additional space for specifying arguments. A
maximum of 10 lines can be opened. Specifying N (No) in the C (Continue?) field closes the ARG field.
General Information
The DO BLOCK statement provides non-sequential program execution within a rule. When a DO BLOCK
statement is encountered during rule processing, Control-M/Analyzer searches for the corresponding
EXECUTE block name in the rule definition. When found, the statements following the specified EXECUTE
block name are executed. When the specified EXECUTE block finishes processing, processing flow
continues sequentially from the point after the DO BLOCK statement.
368
Control-M/Analyzer User Guide
As explained in the ARG parameter, the rule may pass variables as input to the called block. These
variables are called block arguments. Block arguments must be Local or Database variables that have
already been initialized. The called block may change the values of these arguments, causing the new
values to be accessed by the rule.
The called block refers to these arguments by System variables BARGnn, where nn is a number from 1 to
the actual number of passed arguments.
Control-M/Analyzer AutoEdit variables plus Local and Database variables can be embedded in the
arguments. The variables are resolved (replaced) at time of rule execution. For additional information on
AutoEdit processing, see Control-M/Analyzer Variables (on page 222), and in particular Passing Variables
to Blocks, Rules and User Routines (on page 224).
369
Control-M/Analyzer User Guide
Example
EXECUTE block INPUT extracts personnel information from a report. Statement DO BLOCK calls EXECUTE
block CHECK to process this information.
The information extracted from the report is passed as arguments to EXECUTE block CHECK.
EXECUTE block CHECK is located after EXECUTE block FIN that terminates the rule. Block CHECK can only
be activated by statement DO BLOCK in block INPUT.
Figure 186 DO BLOCK Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 013 - 014 STOP AND/OR
STRING = #
DO EXTRACT = NAME
LEVEL 0 LINE +000 COL -002 - +013 PROCESS TYP
DO EXTRACT = SICK
LEVEL 0 LINE +000 COL +087 - +088 PROCESS TYP
DO EXTRACT = VAC
LEVEL 0 LINE +000 COL +093 - +094 PROCESS TYP
DO BLOCK = CHECK ARG NAME,SICK,VAC C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE FIN UPON C
ON DATA
ALWAYS
DO PRINT = +--+---------------+------+-----+ F C
DO PRINT = CHECKED %%CNTR USERS, FOUND %%ERR ERRORS F C
DO REMARK = CHECKED %%CNTR USERS, FOUND %%ERR ERRORS
DO
IF ERR > 5 C
DO TERMINAT = NOTOK COD 2000
DO
===========================================================================
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO SET = CNTR=CNTR+1 C
DO
IF BARG02 > 90 OR BARG03 > 30 C
DO PRINT = | |%%BARG01| %%BARG02 | %%BARG03 | F C
DO SET = ERR=ERR+1 C
DO
(ENTER "ALWAYS", "IF" OR "ELSE")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
370
Control-M/Analyzer User Guide
Optional. Type the word CALLUSER (or its abbreviation CA) next to the DO in the Rule Definition screen.
When Enter is pressed, the = prompt and the following fields are displayed:
Table 222 DO CALLUSER Statement Fields
Field Description
name Name of the user routine to process. This name can have a
maximum of 8 characters. Mandatory.
Program CTBRECL is the user routine that invokes the Reconciliation
facility.
Note: Database variables can be embedded in the ARG parameter only if they have not yet been
committed. After a Database variable is committed, it cannot be specified in the ARG parameter.
When set to Y (Yes), the C (Continue?) field provides space for specifying additional variables. A
maximum of 10 lines can be opened. Specifying N (No) in the C (Continue?) field closes the following
preexisting line.
General Information
The user routine does not have to exist before defining the rule. It must exist prior to rule execution. For
additional information on writing and using user written routines, see A Editing Rule Definitions in the
IOA Edit Environment (on page 660).
371
Control-M/Analyzer User Guide
When Control-M/Analyzer encounters statement DO CALLUSER, the user routine is processed. After the
user routine is processed, processing flow returns to the point in the rule after DO CALLUSER.
If no matching user routine exists, a runtime error occurs.
The return code of the user routine is placed in System variable SYSRC.
AutoEdit variables, plus Local and Database variables prefixed by the %% operator, can be embedded in
the ARG parameter of statement DO CALLUSER. These variables are resolved (replaced) at time of rule
execution. For additional information on AutoEdit processing, see Control-M/Analyzer Variables (on page
222), and in particular Passing Variables to Blocks, Rules and User Routines (on page 224).
For a complete explanation of the Reconciliation facility and how to use it,see Reconciliation Facility (on
page 600).
See member CTBCALLU in the IOA.SAMPLE library for more information about the structure of user
routines that can be called by statement DO CALLUSER.
Example
If the string SEVERE ERROR FOUND, RC= is issued by a program that updates an accounting database,
user routine RESTORDB is called by statement DO CALLUSER. This user routine restores the accounting
database to its previous state.
The return code from the update program is passed as an argument to the user routine.
EXECUTE block FINISH is executed only if the return code from the user routine is greater than zero.
Figure 188 DO CALLUSER Statement Example
LIBRARY : CTB.PROD.RULES RULE : ACCTUPDT
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST STEP03 DDNAME REPORT JOBNM
MODE PG LINECT 0060
DATASTAMP
WHEN LINE 001 - 060 COL 001 - 132 STOP AND/OR
STRING = SEVERE ERROR FOUND, RC=
DO EXTRACT = RETCODE
LEVEL 0 LINE +000 COL +023 - +026 PROCESS TYP
DO CALLUSER = RESTORDB ARG RETCODE C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE FINISH UPON SYSURC>0 C
ON DATA
ALWAYS
DO SHOUT TO OPER2 URGENCY R
= SEVERE PROBLEMS WITH ACCOUNTS DATABASE !! CALL ACC.DEPT NOW
DO
PLEASE FILL IN RULE DEFINITION. 14.06.28
372
Control-M/Analyzer User Guide
Optional. Type the word COMMIT (or its abbreviation COM) next to the DO in the Rule Definition screen.
Press Enter and the = prompt and the following fields are displayed:
373
Control-M/Analyzer User Guide
Subparameter Description
VAR When using the INCLUDE, EXCLUDE or NOW method, the VAR
parameter must specify the appropriate variable names separated
by commas. When using the ALL, NONE or DELETE method, the
VAR field should be left blank.
374
Control-M/Analyzer User Guide
General Information
By default, Database variables modified by a rule (using statement DO SET or DO EXTRACT) are not
immediately written to (stored in) the Control-M/Analyzer Database. Instead, Database variables are
committed at rule termination if the rule does not abend.
If the rule was called by a job step, commitment occurs when the rule terminates.
If the rule was called by another rule through statement DO RULE, commitment occurs when the
called rule terminates.
DO COMMIT statements specified by a rule may override this default and force immediate commitment of
Database variables.
Note: Subsequent settings of a variable (before commitment occurs) change the current value of the
variable. Only the current value of the variable is written to the Database.
The DO COMMIT statement enables a rule to:
Mark or unmark all modified Database variables for commitment.
Selectively mark or unmark specific Database variables for commitment.
Force immediate commitment of specific Database variables.
Delete specific Database variables from the memory of the rule as if these variables were never set.
The DO COMMIT options described above are useful when various rule results and decisions affect how
variables should be committed.
If a rule ends OK, all Database variables are committed. However, if the rule ends NOTOK, it may be
preferred that no variables be committed. In this latter case, DO COMMIT=NONE could be specified
before rule termination to achieve the desired effect.
Instead of issuing a "global" COMMIT (for example, the default COMMIT method), it is possible to commit
certain variables, but not others. This can be achieved by using the DO COMMIT options INCLUDE or
EXCLUDE and specifying the desired variables in the VAR parameter.
The NOW option forces immediate commitment of specified variables. This option enables the creation of
several generations of the same variable during the same rule execution.
The DELETE option reverses variable settings and modifications (provided that the variable was not
already committed). The result is that the variable is undefined as if it had not been previously set or
modified.
Note: The DELETE option frees (unlocks) the Database variable so it can be accessed by other rules
executing concurrently. The EXCLUDE option unmarks the variable for commitment but does not free the
variable until rule termination.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be
embedded in the VAR parameter. These variables are resolved (replaced) at time of rule execution. For
additional information on AutoEdit processing, see Control-M/Analyzer Variables (on page 222).
For additional information on committing Database variables, see Committing Database Variables (on
page 233).
375
Control-M/Analyzer User Guide
Examples
Example 1
By default, if the rule terminates OK, all Database variables are committed. However, if the rule ends
NOTOK, statement DO COMMIT=NONE is performed. The variables are not committed because the values
extracted from the report in the previous EXECUTE block may be wrong.
Figure 190 DO COMMIT Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : CHKCURR
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON SYSOUT PROCST PGMST STEP00 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 006 - 060 COL 008 - 009 STOP AND/OR
STRING = /
DO EXTRACT = DB_CURRENCY.SUM
LEVEL 0 LINE +000 COL +084 - +094 PROCESS TYP
DO
WHEN LINE 006 - 060 COL 003 - 013 STOP AND/OR
STRING = TOTALS
DO EXTRACT = DB_CURRENCY.TOTAL
LEVEL 0 LINE +000 COL +001 - +006 PROCESS TYP
DO EXTRACT = DB_CURRENCY.AVERAGE
LEVEL 0 LINE +000 COL +020 - +026 PROCESS TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE COMMIT UPON C
ON DATA
IF DB_CURRENCY.SUM > 50000.00 C
DO SHOUT TO U-M18 URGENCY R
= PLEASE CHECK CURRENCY FILE; PROBLEMS WITH SUM
DO REMARK = SUM IS OVER 50000
DO COMMIT = NONE VAR C
DO TERMINAT = NOTOK COD 0055
DO
ELSE
DO REMARK = SUM IS NOT OVER 50000
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
PLEASE FILL IN RULE DEFINITION. 14.36.10
Example 2
Total values for the last six months are extracted from a report. Each of these values is saved as a
separate generation of the Database variable DB_CURRENCY.TOTAL. This result is achieved by specifying
statement DO COMMIT=NOW after each appearance of this variable in the report.
376
Control-M/Analyzer User Guide
377
Control-M/Analyzer User Guide
Optional. Type the word COND (or its abbreviation CON) next to the DO on the Rule Definition screen.
When Enter is pressed, Control-M/Analyzer creates an area for the prerequisite condition to be entered.
Table 224 DO COND Statement Fields
Field Description
378
Control-M/Analyzer User Guide
Field Description
General Information
When a DO COND statement is specified, the designated prerequisite conditions are added to or deleted
from the IOA Conditions file according to the specified opt value.
A prerequisite condition can define any user-specified situation. The following are examples of
prerequisite conditions:
ACCT-IN-BALANCE
RESTORE-FILE-G0
SALARY-OK
Prerequisite conditions are the means by that the user can define and implement rule execution
dependencies, including rule-to-rule dependencies or rule dependencies based on successful completion
of a manual task (such as correction of errors).
Prerequisite conditions created by a DO COND statement can trigger (or stop) the activation of other rules
or the execution of processes in Control-M, Control-D, and other environments.
379
Control-M/Analyzer User Guide
Prerequisite conditions deleted by statement DO COND can stop the execution of rules, missions, and jobs
that require those prerequisite conditions.
If the prerequisite condition to be added already exists, or the prerequisite condition to be deleted does
not exist, the Control-M/Analyzer rule continues executing but returns the value 4 in system variable
SYSRC.
Each prerequisite condition is associated with its specified date reference that identifies different runs of
the same job on different scheduling dates.
If two or more DO COND statements contradict one another, the last executed statement overrides the
preceding statements.
Control-M/Analyzer AutoEdit, System and Local variables can be embedded in the condition of a DO COND
statement. These variables are resolved (replaced) at time of rule execution. For additional information on
AutoEdit processing, see Control-M/Analyzer Variables (on page 222).
Example
Prerequisite condition JOBNAME_OK is added if the data is balanced. This prerequisite condition is used to
start a flow of jobs in Control-M.
Figure 193 DO COND Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULCURR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO PRINT = TOTAL SUM IS : %%SUM F C
DO
IF SUM > 1000000.00 C
DO SHOUT TO U-M18 URGENCY R
= PLEASE CHECK CURRENCY FILE; SUM COMPUTED IS %%SUM
DO REMARK = SUM IS OVER 1000000.00 SUM=%%SUM
380
Control-M/Analyzer User Guide
Optional. Statement DO EXIT can be used in any ON statement of any EXECUTE block. However,
statement DO EXIT is usually used in conjunction with a WHEN statement or an IF/ELSE statement.
Type the word EXIT (or its abbreviation EXI) next to the DO on the Rule Definition screen.
Example
In a periodic sales and commissions report, the salesmen are listed in order of decreasing sales volume.
The "top salesman" is the first one listed in the report. This example uses statement DO EXIT to
terminate the extraction process after the name of the top salesman in department 50x has been
extracted.
Figure 195 DO EXIT Statement Example
EXECUTE 'DD'
ON DATA
ALWAYS
DO BLOCK 'READ'
DO TERMINATE RESULT OK USER_CODE 444
EXECUTE 'READ'
ON_FILE 'ACTG.SALES.MNTHLY(SORTDOWN)' ON_PARM MODE PG
WHEN FLINE 1 TLINE 999 FCOL 13 TCOL 14 SEARCH '50'
DO EXTRACT 'TOP_SALE' LEVEL 0 LINE +0 FCOL 20 TCOL 39
DO PRINT DATA 'TOP SALESMAN = %%TOP_SALE'
DO EXIT
381
Control-M/Analyzer User Guide
Optional. The DO EXTRACT statement is not available in an EXECUTE block containing an ON DATA
statement.
Type the word EXTRACT (or its abbreviation EXT) to the right of the DO parameter label on the Rule
Definition screen. Press Enter and the = prompt with the following fields is displayed:
382
Control-M/Analyzer User Guide
Field Description
LEVEL Level of the WHEN statement in the current WHEN criteria that is to
be used as a reference for this extraction. The default is the current
level (which can be specified as level 0). See statement WHEN for
additional information. Optional.
COL Specifies the column range from which to extract data, comprised
of:
col_from – A 4-digit or signed 3-digit number must be specified.
Mandatory.
col_until – A 4-digit or signed 3-digit number must be specified.
Mandatory.
Valid values are specified and described in Table 226.
Notes: Line and column positions can also be specified using
Relative Values (for example, the column at which the WHEN string
was found plus an offset value). For more information, see General
Information (on page 385).
The number of columns in the COL range cannot exceed 100
because the maximum length of the variable value (after resolving
%% operators, if any) is 100 bytes.
383
Control-M/Analyzer User Guide
Field Description
384
Control-M/Analyzer User Guide
Field Description
mathematical format.
BUNPKn – Converts packed format numbers to standard
mathematical format, including n decimal places.
BUPROC – Calls a user defined process.
BWn – Extracts the nth word from a string.
BXuvwxyz – Filters specified characters (uvwxyz) from the data.
BZONED – Converts zoned decimal numbers to standard
decimal character format.
BCPROCn – Performs a series of processes.
For more information about most of these processes, see DO
EXTRACT Processes (on page 389).
User-defined processes must begin with the letter U. User Exit
CTBX010 can be modified to call user-defined processes. For
information about User Exit CTBX010, see the IOA.SAMPEXIT
library.
For information about compiling and linking member CTBX010, see
the INCONTROL for z/OS Installation Guide.
General Information
DO EXTRACT extracts information that is located in the specified column range on the specified line. The
line number and column range can contain the following types of values:
385
Control-M/Analyzer User Guide
Table 226 Valid DO EXTRACT Line Number and Column Range Values
Value Description
Absolute Column Explicit column numbers of a line relative to the line located by the
Values current WHEN statement.
Example
LINE +003 COL 0052-0060
Relative Values Line numbers must be and column numbers may be specified with
a + (plus) or – (minus) prefix:
+nnn nnn lines or columns after the current position (located by the
current WHEN statement). +000 specifies the same line or column
located by the current WHEN statement.
-nnn nnn lines or columns before the current position (located by the
current WHEN statement).
Example
LINE +005 COL +010 - +020
Line specifications and relative column specifications are relative to
the line and first column of the location where the search string
specified by WHEN criteria was found.
The relevant WHEN statement is at the WHEN level specified by the
LEVEL parameter of statement DO EXTRACT.
The default LEVEL is zero, which refers to the last WHEN before the DO EXTRACT statement.
Control-M/Analyzer AutoEdit variables and Local variables can be embedded in the varname parameter of
statement DO EXTRACT. The variables are resolved (replaced) at time of rule execution. For additional
information on AutoEdit processing, see Control-M/Analyzer Variables (on page 222), and in particular
Passing Variables to Blocks, Rules and User Routines (on page 224).
Examples
A report is provided below to illustrate uses of statement DO EXTRACT. The report shows the status of
accounts receivable for a company. It is formatted as follows:
Every account starts on a new page. An account may span several pages. In this case, the word
CONTINUED appears in the STATUS column at the bottom of each page (except the last) for that
account.
If an account has an outstanding balance, the balance is printed after the words TOTAL DUE:
If the account has no outstanding balance, the words PAID IN FULL are displayed instead.
386
Control-M/Analyzer User Guide
The page number is printed at the top of each page, prefixed by the word PAGE. There is a maximum
of 60 lines on each page.
Each line of the report starts in column 2. (The first column is reserved for ASA-code control character
symbols.)
Note: Column numbering lines have been provided at the top and bottom of the sample report on the
next page for your convenience. These lines are not actual report lines.
The following examples are based on this sample report.
Figure 197 Sample Report with DO EXTRACT Examples
---+----1----+----2----+----3--——+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+—
1 1 1
---+----1----+----2----+----3--——+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+—
387
Control-M/Analyzer User Guide
Example 1
String TOTAL DUE: is located and the total amount owed extracted. The rule then stores the total amount
owed into Control-M/Analyzer Local variable TOTAL_OWED.
Figure 198 DO EXTRACT Example 1 from Sample Report
LIBRARY : CTB.PROD.RULES RULE : CALCTOT
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M18B GROUP ACCOUNTS
UPDATED 05/05/99 - 15:30:05 BY M18B
DESC CALCULATE TOTAL OUTSTANDING BALANCE OWED THE COMPANY
OPTIONS
===========================================================================
EXECUTE GETOWED UPON C
ON SYSOUT PROCST PGMST STEP12 DDNAME ACCREP JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 006 - 060 COL 095 - 120 STOP AND/OR
STRING = TOTAL DUE:
DO EXTRACT = TOTAL_OWED
LEVEL 1 LINE +000 COL +011 - +018 PROCESS TYP
DO PRINT = %%TOTAL-OWED F C
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 13.47.53
Example 2
A summary report (that provides a list of company names and their financial status) is created.
The company name is extracted from the same line in which the string ACCOUNT was found (for
example, Level 1 WHEN statement) using relative column values.
The status of this company is extracted from the same line in which was found the string TOTALS (for
example, Level 2 WHEN statement). The actual status is extracted from relative columns.
Figure 199 DO EXTRACT Example 2 from Sample Report
LIBRARY : CTB.PROD.RULES RULE : SUMREP
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
OWNER M18B GROUP ACCOUNTS
UPDATED 09/09/99 - 15:30:05 BY M18B
DESC SUMMARIZE THE ORIGINAL REPORT
OPTIONS
============================================================================
EXECUTE REPORT UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060
DATASTAMP
WHEN LINE 004 - 004 COL 004 - 010 STOP Y AND/OR A
STRING = ACCOUNT
STOP LINE 001 - 006 COL 002 - 010
STRING = .NP.
WHEN LINE 006 - 060 COL 004 - 010<+> STOP AND/OR
STRING = TOTALS
DO EXTRACT = NAME
LEVEL 1 LINE +000 COL +008 - +034 PROCESS TYP
DO EXTRACT = STATUS
LEVEL 2 LINE +000 COL +092 - +116 PROCESS TYP
DO PRINT = %%NAME-%%STATUS F C
DO
PLEASE FILL IN RULE DEFINITION. 14.43.36
388
Control-M/Analyzer User Guide
Example 3
The average invoice amount for each company is calculated and a report is produced in which the
company name and average invoice amount are listed.
An average extraction (TYP=AV) of the invoice amount of each company into a variable is performed (for
example, the invoice amount of each line that belongs to the current company is extracted and a
"running" average is calculated for this variable).
Figure 200 DO EXTRACT Example 3 from Sample Report
LIBRARY : CTB.PROD.RULES RULE : AVERAGES
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
EXECUTE CALCAVG UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 005 - 005 COL 002 - 011 STOP Y AND/OR A
STRING = ACCOUNT
STOP LINE 006 - 060 COL 002 - 015
STRING = TOTALS
WHEN LINE 006 - 006 COL 001 - 020 STOP Y AND/OR A
STRING = ————
STOP LINE 007 - 060 COL 001 - 020
STRING = ————
WHEN LINE L02+001 - 060 COL 070 - 081 STOP AND/OR
STRING = .AL.
DO EXTRACT = FULLNAME
LEVEL 1 LINE +000 COL +008 - +034 PROCESS TYP
DO EXTRACT = SHRTNAME
LEVEL 1 LINE +000 COL +031 - +033 PROCESS TYP
DO BLOCK = CHKNAME ARG SHRTNAME,FULLNAME
DO EXTRACT = AVG%%SHRTNAME C
LEVEL 0 LINE +000 COL +000 - +011 PROCESS TYP AV
PLEASE FILL IN RULE DEFINITION. 14.09.00
DO EXTRACT Processes
Shown below are the DO EXTRACT processes available under Control-M/Analyzer.
389
Control-M/Analyzer User Guide
390
Control-M/Analyzer User Guide
391
Control-M/Analyzer User Guide
392
Control-M/Analyzer User Guide
393
Control-M/Analyzer User Guide
For additional information about System variables SYSEXTUPROC and SYSEXTVAL see Summary of
System Variables (on page 262).
394
Control-M/Analyzer User Guide
Table 233 BWn – Extract the nth Word From a String Example
395
Control-M/Analyzer User Guide
BZONED Hex‘C1’ 1
BZONED Hex‘D4’ -4
396
Control-M/Analyzer User Guide
Optional. Type the word GETMEM (or its abbreviation GE) next to the DO in the Rule Definition screen.
When Enter is pressed, the = prompt and the following fields are displayed:
Table 237 DO GETMEM Statement Fields
Field Description
General Information
AutoEdit variables can be used to pass information between Control-M/Analyzer rules and between
Control-M/Analyzer and other INCONTROL products (Control-M, Control-D, Control-O, and so on). The
following statements access AutoEdit members:
DO GETMEM enables subsequent actions of the rule to access (by AutoEdit statements or DO SET
statements) AutoEdit variables contained in the specified AutoEdit member.
DO ADDSYM adds an AutoEdit variable to an AutoEdit member.
DO PUTMEM writes the AutoEdit member back to its library for future use.
Several AutoEdit members can be specified. If the same AutoEdit variable exists in more than one
AutoEdit member, the variable in the last specified member is used.
If a Local variable and an AutoEdit variable have the same name, the Local variable is resolved.
Use statement DO SET to assign a new value to an existing AutoEdit variable:
397
Control-M/Analyzer User Guide
DO SET %%A='5'
Also use statement DO SET to assign a new value to an existing Local variable:
DO SET A='6'
Use statement DO ADDSYM to add new variables to a member read by statement DO GETMEM. The
entire member (including new variables) should be written back to the Database by statement DO
PUTMEM.
If an AutoEdit member is read by statement DO GETMEM but its AutoEdit variables are not written back
to the Database by statement DO PUTMEM, a warning message is placed in the sysout of the job.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be
embedded in parameters of statement DO GETMEM. The variables are resolved (replaced) at time of rule
execution. For additional information on AutoEdit processing, see Control-M/Analyzer Variables (on page
222), and in particular Passing Variables to Blocks, Rules and User Routines (on page 224).
The existence of the library and member is checked when the rule is executed and not when the rule is
created or modified.
For more information, see DO ADDSYM: Automated Balancing Statement (on page 364), and DO
PUTMEM: Automated Balancing Statement (on page 412).
Example
Statement DO GETMEM reads member TOTALS from library CTB.PROD.SYMBOLS and makes the values
of all the AutoEdit variables in this member available to the current Control-M/Analyzer rule.
Figure 203 DO GETMEM Statement Example
LIBRARY : CTB.PROD.RULES RULE : UPDAUTO
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M64 GROUP OPERATIONS
UPDATED 07/07/00 - 12:19:03 BY M64
DESC UPDATE AUTO-EDIT VARS WITH CONTROL-M/ANALYZER DATABASE VAL
OPTIONS
===========================================================================
EXECUTE UPDATE UPON C
ON DATA
ALWAYS
DO GETMEM = TOTALS
LIBSYM CTB.PROD.SYMBOLS
DO SET = %%APPLTOT=DB_ACCOUNT.APPL_TOTAL.@G0 C
DO PUTMEM = TOTALS
LIBSYM CTB.PROD.SYMBOLS
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
398
Control-M/Analyzer User Guide
Optional. The DO GOTO statement is available only in an EXECUTE block containing an ON DATA
statement.
Type the word GOTO (or its abbreviation GO) next to the DO in the Rule Definition screen. When Enter
is pressed, the following field is displayed:
Table 238 DO GOTO Statement Fields
Field Description
LABEL Name of the LABEL that precedes the statements to process. LABEL
can have a maximum of 8 characters. The specified LABEL name
should match an existing LABEL name in the current EXECUTE
block. Mandatory.
General Information
The DO GOTO statement provides non-sequential program execution (branching) within a block. When a
DO GOTO statement is encountered during rule processing, Control-M/Analyzer searches for the
corresponding LABEL name in the current block. When found, the statements following the LABEL name
are executed. Processing flow does not return to the point after the DO GOTO statement.
399
Control-M/Analyzer User Guide
Example 1
If variable TOTAL or variable AVERAGE (extracted from the report by a previous EXECUTE block) is not
within the specified range, rule processing flow proceeds directly to label ERROR using statement DO
GOTO. The rule then terminates NOTOK.
Figure 205 DO GOTO Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : CHKACC
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO PRINT = CHECKING ACCOUNTS REPORT - SYSDATE, SYSTIME F C
DO
IF TOTAL>200 C
DO PRINT = TOTAL CHECKED AND IS ACCORDING TO EXPECTATIONS. F C
DO
ELSE
DO PRINT = TOTAL NOTOK, PLEASE CHECK ... F C
DO GOTO LABEL ERROR
DO
IF AVERAGE>150 AND AVERAGE<2000 C
DO PRINT = AVERAGE CHECKED AND IS IN THE CORRECT RANGE. F C
DO
ELSE
DO PRINT = AVERAGE NOT IN THE RIGHT RANGE, PLEASE CHECK ... F C
DO GOTO LABEL ERROR
DO
ALWAYS
DO TERMINAT = OK COD 0000
DO
LABEL: ERROR
ALWAYS
DO TERMINAT = NOTOK COD 3333
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
400
Control-M/Analyzer User Guide
Example 2
The person who has the highest salary in the organization is located. A single loop is performed, during
that the salaries are examined and the highest salary determined. The loop is implemented using
statement DO GOTO. Local variable I is the number of salaries to be examined. Local variable J is a
counter that was previously set to zero.
Figure 206 DO GOTO Statement – Example 2
LIBRARY : CTB.PROD.RULES RULE : MAXSAL
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO SET = MAX_SALARY=0 C
DO SET = MAX_COUNTER=0 C
DO
LABEL: LOOP
IF SALARY%%J > MAX_SALARY C
DO SET = MAX_SALARY=SALARY%%J C
DO SET = MAX_COUNTER=J C
DO
IF J<I C
DO SET = J=J+1 C
DO GOTO LABEL LOOP
DO
ALWAYS
DO PRINT = THE MAXIMUM SALARY IS %%MAX_SALARY F C
DO PRINT = IT IS EARNED BY %%PERSON%%MAX_COUNTER F C
DO
PLEASE FILL IN RULE DEFINITION. 11.27.52
401
Control-M/Analyzer User Guide
Optional. Type MAIL (or its abbreviation MA) in the DO field and press Enter. The following
subparameters are displayed:
402
Control-M/Analyzer User Guide
Subparameters Description
General Information
The specified e-mail is sent to the specified destinations when the accompanying ON statement criteria
are satisfied. Although e-mail can be sent using a DO SHOUT statement, the DO MAIL statement provides
the following advantages:
403
Control-M/Analyzer User Guide
Using DO MAIL, you can specify any number of TO and CC recipients. With DO SHOUT, you must
specify the mail destination prefix, and you must define the address in the MAILDEST table.
Using DO MAIL, the e-mail text can exceed 70 characters. Both system and user-defined AutoEdit
variables are supported in the subject line and message text. These variables are resolved when the
DO MAIL statement is processed.
Note: The resolved value of an AutoEdit variable is truncated after 70 characters.
For information on the use of AutoEdit variables, see AutoEdit Variables (on page 256).
The TO and CC Subparameters
The TO and CC subparameters can contain more than one mail name address. When a value is specified
in the TO or CC field, a new empty line is displayed so that an additional value can be specified (up to a
maximum of 255 lines).
Multiple addresses, separated by a semicolon (;), can be specified on a line.
If an address exceeds the length of a full line, it can be continued on the following line.
Example
If the job is not run due to a JCL error, send an e-mail to the relevant users:
Figure 208 DO MAIL Parameter Example
JOB: SACALC01 LIB CTM.PROD.SCHEDULE TABLE: SALARY
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
OUT
AUTO-ARCHIVE Y SYSDB Y MAXDAYS MAXRUNS
RETENTION: # OF DAYS TO KEEP 030 # OF GENERATIONS TO KEEP
SYSOUT OP (C,D,F,N,R) FROM
MAXRERUN RERUNMEM INTERVAL FROM
STEP RANGE FR (PGM.PROC) . TO .
ON PGMST ANYSTEP PROCST CODES JNRUN A/O
DO MAIL
TO MAIL_ADDRESS_#1
TO MAIL_ADDRESS_#2
CC MAIL_ADDRESS_#3;MAILK_ADDRESS_#4
SUBJ WARNING MESSAGE
TEXT JCL ERROR IN SALARY JOB! PLEASE CORRECT ERRORS AND RERUN THE JOB
DO
ON PGMST PROCST CODES A/O
DO
SHOUT WHEN TIME + DAYS TO URGN
MS
======= >>>>>>>>>>>>>>>>>>> END OF SCHEDULING PARAMETERS <<<<<<<<<<<<<<<< =====
404
Control-M/Analyzer User Guide
Optional. Type the word PRINT (or its abbreviation PR) next to the DO on the Rule Definition screen.
When Enter is pressed, the = prompt and a field for specifying the data string are displayed.
Table 240 DO PRINT Statement FIelds
Field Description
F When set to Y (Yes), the F (Format) field provides one or more pairs
of lines for specifying the format of numeric data to be printed by
the Dynamic Print facility described below.
C When set to Y (Yes), the C (Continue) field provides one more line
containing a maximum of 59 characters for specifying the
data-string. Specifying N (No) in the C (Continue?) field closes the
continuation line.
General Information
The DO PRINT statement specifies data strings to be included in the Control-M/Analyzer Rule Activity
report (that is generated after each Control-M/Analyzer invocation) and in the SYSUSER file (that is part
of the sysout of the job that invoked the rule). The printed data can be formatted and/or directed to a file
referenced by DD statement SYSUSER or an alternative DD statement. For more information, see
Dynamic Print Formatting Facility (on page 407).
405
Control-M/Analyzer User Guide
The Rule Activity report also includes automatically generated system data. It can be viewed online by
selecting the R (Report) option for the associated rule in the Rule Activity display (screen BA). For more
information, see Rule Activity Display Facility (on page 157).
All types of Control-M/Analyzer variables can be embedded in the DO PRINT data string. Variables
containing %% are resolved (replaced) at time of rule execution.
Statement DO PRINT can print long strings with the following syntax:
DO PRINT=%%long-string-variable
where long-string-variable is the name of a long string variable such as SYSCURLINE, SYSLSTR1,
SYSLSTR2, and so on.
This syntax for long string variables supports the OUTDD parameter but does not support concatenation
with other strings or literal constants.
Example 1
The header for the report produced by Control-M/Analyzer as a result of the invocation of this rule is
prepared using DO PRINT statements.
Figure 210 DO PRINT Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M18B GROUP ADMIN
CREATED 08/08/00 - 15:30:05 BY M18B
DESC CHECK EMPLOYEES REPORT FOR BALANCING
OPTIONS
===========================================================================
EXECUTE PREPARE UPON C
ON DATA
LABEL: INIT
ALWAYS
DO SET = COUNTER=0 C
DO SET = ERRORS=0 C
DO PRINT = UNREASONABLE SICK/VACATION DAYS F C
DO PRINT = ================================= F C
DO PRINT = +—+———————-+——+——-+ F C
DO PRINT = | NAME | SICK | VAC | F C
DO PRINT = +—+———————-+———+——-+ F C
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
PLEASE FILL IN RULE DEFINITION. 11.34.30
Example 2
This example illustrates the specification of variables containing the %% operator in statement DO
PRINT. These variables are replaced by their current value each time statement DO PRINT is performed.
406
Control-M/Analyzer User Guide
407
Control-M/Analyzer User Guide
Whether the minus sign should be printed to the left or right of the number. Negative 100.78 can be
printed as –100.78 or 100.78–.
Which symbol should represent the decimal point. 100.78 can be printed as 100.78 or 100,78
(European format).
Whether delimiters should be used to mark thousands, millions, and so on, 12345.88 can be printed
as 12345.88 or 12,345.88 or 12.345,88.
Whether text strings should be padded with trailing blanks to fill an output field.
Figure 212 DO PRINT Statement Invoking the Dynamic Print Formatting Facility
The Dynamic Print Formatting facility is invoked by specifying Y (Yes) in the F (Format) parameter to the
right of the DO PRINT statement in the Rule Definition screen. When Enter is pressed, the parameters
described below are displayed.
Table 241 Fields in DO PRINT Statements when the Dynamic Print Formatting Facility is
Invoked
Field Description
OUTDD Name of the DD statement that references the file to which the
output string specified in statement DO PRINT will also be written.
Optional, but OUTDD or VAR should be specified. The default output
DD statement is SYSUSER. When any other value is specified, the
user must include the specified DD statement in the JCL for the job.
408
Control-M/Analyzer User Guide
Field Description
PREC Number of digits following the decimal point in the output value.
Must be an integer. Valid values are from 0 through 132 but at least
one less than the value specified for the LEN parameter. Default
value is 0. Optional, but should be specified if the value of VAR is
numeric. This parameter is ignored when the value of VAR is a text
string.
C (Continue?) When set to Y (Yes), this field displays another pair of lines (for
example, FORMAT VAR and LEN/PREC/DELIMITER/SIGN) for
specifying the output format of another variable. A maximum of 10
format statements can be specified.
Specifying N (No) in the C (Continue?) field closes the following
preexisting line.
409
Control-M/Analyzer User Guide
In the salary field, each group of three digits is separated by a comma (if the SYSDECCHAR parameter is
set to period) or by a period (if the SYSDECCHAR parameter is set to comma). A "thousands" separator is
not used in the insurance, union dues and social security fields.
Negative values for salary or insurance are preceded by a minus sign. Negative union dues are followed
by a minus sign.
Figure 213 Dynamic Print Formatting Facility – Example
LIBRARY : CTB.WORK.SOLVRULE RULE : RULE4
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
EXECUTE PROCESS UPON C
ON FILE FILENAME CTB.WORK.SOLVREP(CTBREP3)
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 036 - 037 STOP AND/OR
STRING = .GT.40
DO EXTRACT = SOCIAL_SECURITY
LEVEL 0 LINE +000 COL 0045 - 0055 PROCESS TYP
DO EXTRACT = SALARY
LEVEL 0 LINE +000 COL 0036 - 0041 PROCESS BFNUM TYP
DO EXTRACT = INSURANCE
LEVEL 0 LINE +000 COL 0092 - 0097 PROCESS TYP
DO EXTRACT = UNION_DUES
LEVEL 0 LINE +000 COL 0081 - 0086 PROCESS TYP
DO EXTRACT = VACATION
LEVEL 0 LINE +000 COL 0107 - 0108 PROCESS TYP
DO PRINT = %%SOCIAL_SECURITY %%SALARY %%INSURANCE F Y C Y
%%UNION_DUES %%VACATION
OUTDD
FORMAT VAR SALARY C Y
LEN 010 PREC 002 DELIMITER Y SIGN
FORMAT VAR INSURANCE C Y
LEN 010 PREC 002 DELIMITER N SIGN
FORMAT VAR UNION_DUES C Y
LEN 010 PREC 002 DELIMITER N SIGN R
FORMAT VAR SOCIAL_SECURITY C
LEN 006 PREC 000 DELIMITER N SIGN
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
============================================================================
410
Control-M/Analyzer User Guide
123.45 10 2 Y . 123.45
4123.45 10 2 Y . 4,123.45
–4123.45 10 2 Y . –4,123.45
123.45 10 2 Y , 123,45
4123.45 10 2 Y , 4.123,45
–4123.45 10 2 N , –4123,45
123.45 10 2 Y R . 123.45
4123.45 10 2 Y R . 4,123.45
–4123.45 10 2 Y R . 4,123.45–
12.464 10 2 Y . 12.46
123.45 10 3 Y . 123.450
0 10 3 Y . 0.000
1232 10 3 N . 1232.000
The size of the fractional portion of the output value is adjusted to the value of the PREC parameter. If
the number of decimal digits after the point in the input variable is less than the value of PREC, zeroes are
added to it. If the number of decimal digits after the point in the input variable is greater than the value
of PREC, the last (least significant) digits are rounded.
The formatting facility allows for up to 16 digits to be displayed for a printed value, including the
fractional portion of that value. Values larger than 16 digits are rounded. For example, if the total length
of the value is 18 digits, then the last (least significant) two digits are rounded.
411
Control-M/Analyzer User Guide
Optional. Type the word PUTMEM (or its abbreviation PU) next to the DO in the Rule Definition screen.
When Enter is pressed, the = prompt and the following fields are displayed:
Table 243 DO PUTMEM Statement Fields
Field Description
LIBSYM Name of the library (44 character maximum) to which the member
belongs. Mandatory.
General Information
AutoEdit variables can be used to pass information between Control-M/Analyzer rules and between
Control-M/Analyzer and other INCONTROL products (Control-M, Control-D, Control-O, and so on). The
following statements access AutoEdit members:
DO GETMEM enables subsequent actions of the rule to access (by AutoEdit statements or DO SET
statements) AutoEdit variables contained in the specified AutoEdit member.
DO ADDSYM adds an AutoEdit variable to an AutoEdit member.
DO PUTMEM writes the AutoEdit member back to its library for future use.
After DO PUTMEM is executed, AutoEdit variables belonging to the written member are deleted from
memory and are unavailable for referencing (unless the member is again read by a DO GETMEM
statement).
412
Control-M/Analyzer User Guide
If member-name has been read by a DO GETMEM statement and exists in library LIBSYM,
Control-M/Analyzer replaces the member with its current AutoEdit variables. If member-name has not
been previously read (by a DO GETMEM statement) and does not exist in the LIBSYM library,
Control-M/Analyzer creates the member. If member-name exists in the LIBSYM library but has not been
previously read, modifications to the AutoEdit variables are not retained when the DO PUTMEM statement
is performed. In this case, a runtime error occurs.
If an AutoEdit member is read by the DO GETMEM statement but its AutoEdit variables are not written
back to the Database by the DO PUTMEM statement, a warning message is placed in the sysout of the
job. The AutoEdit variable values are not saved.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be
embedded in parameters of the DO PUTMEM statement. The variables are resolved (replaced) at time of
rule execution. For additional information on AutoEdit processing, see Chapter 3, "Control-M/Analyzer
Variables." For additional information on AutoEdit processing, see Control-M/Analyzer Variables (on page
222), and in particular Passing Variables to Blocks, Rules and User Routines (on page 224).
For more information, see DO ADDSYM: Automated Balancing Statement (on page 364), and DO GOTO:
Automated Balancing Statement (on page 399).
Example
Statement DO PUTMEM writes member TOTALS back to library CTB.PROD.SYMBOLS after the values of
certain AutoEdit variables in this member are changed by the rule.
Figure 215 DO PUTMEM Statement Example
LIBRARY : CTB.PROD.RULES RULE : UPDAUTO
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M64 GROUP OPERATIONS
UPDATED 08/08/00 - 12:19:03 BY M64
DESC UPDATE AUTO-EDIT VARS WITH CONTROL-M/ANALYZER DATABASE VALUE
OPTIONS
===========================================================================
EXECUTE UPDATE UPON C
ON DATA
ALWAYS
DO GETMEM = TOTALS
LIBSYM CTB.PROD.SYMBOLS
DO SET = %%APPLTOT=DB_ACCOUNT.APPL_TOTAL.@G01 C
DO PUTMEM = TOTALS
LIBSYM CTB.PROD.SYMBOLS
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 17.50.35
413
Control-M/Analyzer User Guide
Optional. Type the word REMARK (or its abbreviation RE) next to the word DO in the Rule Definition
screen. When Enter is pressed, the = prompt and a field where the remark can be specified are
displayed. The remark can have a maximum of 50 characters. It must have at least one non-blank
character.
General Information
The DO REMARK statement adds a user-defined remark to the Control-M/Analyzer Rule Activity report and
the Rule Activity display (screen BA). The remark usually describes the results of the current
Control-M/Analyzer invocation. The remark can be displayed in the Rule Activity List screen to provide a
user-specified summary of invocation results.
If several DO REMARK statements are specified in the rule, only the last one is retained and added to the
Rule Activity report.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be
embedded in the DO REMARK statement. These variables are resolved (replaced) at time of rule
execution. For additional information on AutoEdit processing see Control-M/Analyzer Variables (on page
222).
Example
Specify different remarks to be displayed on the Control-M/Analyzer Rule Activity display (screen BA)
according to the value of variable SUM.
414
Control-M/Analyzer User Guide
415
Control-M/Analyzer User Guide
Optional. Type the word RULE (or its abbreviation RU) next to the DO in the Rule Definition screen.
When Enter is pressed, the = prompt and the following fields are displayed:
Table 244 DO RULE Statement Fields
Field Description
When set to Y (Yes), the C (Continue?) field provides additional space for specifying variables. A
maximum of 10 lines can be opened. Specifying N (No) in the C (Continue?) field closes the following
preexisting line.
General Information
When the DO RULE statement is encountered during rule processing, Control-M/Analyzer invokes the
specified rule. When the specified rule finishes processing, processing flow continues sequentially from
the point after the DO RULE statement in the calling rule.
416
Control-M/Analyzer User Guide
Rule recursion (for example, a rule calling itself), whether explicit or implicit, is not permitted. A runtime
error occurs when recursion is detected.
The called rule is read from the libraries referenced by the DABRULE DD statement.
The return code of the called rule is placed in System variable SYSRC.
The calling rule may pass variables as input to the called rule, as explained above. These variables are
called rule arguments. Rule arguments must be Local or Database variables that have already been
initialized. The called rule may change the values of these arguments, causing the new values to be
returned to the calling rule.
The called rule refers to these arguments by specifying the RARGnn parameter, where nn is a number
from 1 to the actual number of passed arguments.
Control-M/Analyzer AutoEdit variables plus Local and Database variables (preceded by the %% prefix)
can be embedded in the ARG parameter of the DO RULE statement. The variables are resolved (replaced)
at time of rule execution. For additional information on AutoEdit processing, see Control-M/Analyzer
Variables (on page 222), and in particular Passing Variables to Blocks, Rules and User Routines (on page
224).
Control-M/Analyzer Database variables are committed (according to the method specified in the DO
COMMIT statement) when the rule terminates.
If the rule was called by a job step, commitment occurs when the rule terminates.
If the rule was called by another rule (by the DO RULE statement), commitment occurs when the
calling rule terminates.
After termination of the called rule, processing flow control returns to either the next step (in the job that
called the rule) or the calling rule – depending on that entity invoked the called rule.
417
Control-M/Analyzer User Guide
Example
Control-M/Analyzer rule COMPNET is invoked as a subroutine to calculate the net salary for each
employee.
Figure 219 DO RULE Statement Example
LIBRARY : CTB.PROD.RULES RULE : ADMSAL
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M18B GROUP ADMIN
UPDATED 08/08/00 - 15:30:05 BY M18B
DESC PRODUCE A SUMMARY SALARY REPORT FOR MANAGEMENT
OPTIONS
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 013 - 014 STOP AND/OR
STRING = |
DO EXTRACT = NAME
LEVEL 0 LINE +000 COL +002 - +013 PROCESS TYP
DO EXTRACT = ID
LEVEL 0 LINE +000 COL +015 - +023 PROCESS TYP
DO EXTRACT = GROSS_SALARY
LEVEL 0 LINE +000 COL +080 - +090 PROCESS TYP
DO RULE = COMPNET ARG ID,GROSS_SALARY,NET_SALARY C
DO PRINT = %%NAME %%GROSS_SALARY %%NET_SALARY F C
DO
WHEN LINE - COL - STOP AND/OR
PLEASE FILL IN RULE DEFINITION. 12.52.47
Optional. Type the word SET (or its abbreviation SE) next to the DO in the Rule Definition screen. When
Enter is pressed, the = prompt and a field for the specification of an expression are displayed. The
expression must be specified according to the following format:
varname=value
where
418
Control-M/Analyzer User Guide
General Information
varname can be a Control-M/Analyzer Database variable, AutoEdit variable, Local variable, or, in certain
cases, a System variable. For more information on setting variables see see Control-M/Analyzer Variables
(on page 222). The Summary of System Variables (on page 262) indicates that System variables can be
set by statement DO SET.
When varname is a Database variable, the variable name specified must adhere to certain naming
conventions. See Database Variable Reference Method (on page 230) for additional information.
Control-M/Analyzer AutoEdit variables and Local variables (preceded by the %% operator) can be part of
the variable name. These variables are resolved (replaced) at time of rule execution. The largest number
that can be handled by mathematical AutoEdit operations is 2 GB (2147483647). For additional
information on AutoEdit processing, see Control-M/Analyzer Variables (on page 222), and in particular
Passing Variables to Blocks, Rules and User Routines (on page 224).
For information about committing variables that have been assigned a value by statement DO SET, see
DO COMMIT: Automated Balancing Statement (on page 373) and Committing Database Variables (on
page 233).
Examples
Example 1
Initialize Control-M/Analyzer variables COUNTER and ERRORS before starting rule processing.
419
Control-M/Analyzer User Guide
Example 2
Values are assigned to Control-M/Analyzer Local variables COUNTER and ERRORS during rule processing.
AutoEdit variables are used in statement DO PRINT. These variables are replaced by their current value
each time statement DO PRINT is performed.
Figure 222 DO SET Statement – Example 2
LIBRARY : CTB.PROD.RULES RULE : DOSET
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO SET = COUNTER=COUNTER+1 C
DO
IF SICK > 90 AND VAC > 30 C
DO PRINT = %%COUNTER %%NAME %%SICK %%VAC F C
DO SET = ERRORS=ERRORS+1 C
DO
(ENTER "ALWAYS", "IF" OR "ELSE")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
420
Control-M/Analyzer User Guide
Type SHOUT (or its abbreviation SH) next to the DO in the Rule Definition screen.
When Enter is pressed, the following fields are displayed:
Table 245 DO SHOUT Statement Fields
Field Description
421
Control-M/Analyzer User Guide
Field Description
URGENCY Determines the priority level of the message. Valid values are:
R – Regular. Default
U – Urgent
V – Very urgent
422
Control-M/Analyzer User Guide
General Information
The message is sent to the required destination when the accompanying ON statement criteria are
satisfied.
The TO Subparameter
Specify TO=USERID-userid, to write the message to the IOA Log file under the user ID specified in the
parameter.
Specify TO=OPER[–n], to send the message to the operator console (route code n). If the n value is
omitted, the message is sent to all consoles to which route codes 1 or 11 are assigned. For more detailed
information regarding route and descriptor codes, refer to the IBM publication Routing and Descriptor
Codes, GC38-1102.
Specify TO=OPER2[–n], to send a highlighted, unrollable message is sent to the operator console (route
code n). If the n value is omitted, the message is sent to all consoles to which route codes 1 or 11 are
assigned. For more detailed information regarding route and descriptor codes, refer to the IBM publication
Routing and Descriptor Codes, GC38-1102.
Specify TO=TSO-id or T-id, to send the message is sent to the 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, specify JES command $LSYS.
Specify TO=U-M: mail-name-prefix to send the message by e-mail to the recipient identified by the prefix.
The full mail name address is supplied by the MAILDEST table in the IOA PARM library. For more
information about mail destinations, see the INCONTROL for z/OS Administrator Guide. The IOAPARM
member includes DFLTSFFX, the mail address suffix, such as MAIL.DOMAIN.COM, the SMTP STC name,
and the HOSTNAME.
423
Control-M/Analyzer User Guide
o If these messages must also be sent to the MVS operator console, the OPER2CON parameter
must also be set to Y (Yes).
o If these messages must not also be sent to the MVS operator console, the OPER2CON
parameter must also be set to N (No).
• If TO=U-ECS messages must be sent to Control-M/Enterprise Manager, the UECS2ECS parameter
must be set to Y (Yes); otherwise, it must be set to N (No). Regardless of the value of this
parameter, these messages are also sent to Control-M/Analyzer and the IOA Log.
Once the above conditions are satisfied, messages can be shouted to Control-M/Enterprise Manager by
specifying a destination of TO=OPER or TO=OPER2 (without a route code qualifier), or TO=U-ECS.
Such messages are then placed by Control-M/Analyzer in the M2G file. Once the shouted message is in
the M2G file, the Control-M/Analyzer Application Server reads the file and sends the message to the
Control-M/Enterprise Manager user.
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 (on page 195).
Example
TSO-user M18 is notified if the computed sum is more than 1,000,000.00.
Figure 224 DO SHOUT Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULCURR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
IF SUM > 1000000.00 C
DO SHOUT TO TSO-M18 URGENCY R
= PLEASE CHECK CURRENCY FILE; SUM COMPUTED IS &&SUM
DO REMARK = SUM IS OVER 1000000.00 SUM=%%SUM
DO COND = NOTOK-%%SYSJOBNAME 0704 +
DO TERMINAT = NOTOK COD 0055
DO
ELSE
DO REMARK = SUM IS NOT OVER 1000000.00 SUM=%%SUM
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
424
Control-M/Analyzer User Guide
Optional. Type the word SYSOUT (or its abbreviation SY) next to the DO in the Rule Definition screen.
When Enter is pressed, the following fields are displayed:
Table 246 DO SYSOUT Statement Fields
Field Description
OPT Processing option for the job output. Mandatory. Specify one of the
following codes:
C—Change class of job output
D—Delete job output (purge)
N—Change destination of job output
R—Release job output for printing
PRM If OPT=C, PRM specifies the name of the new class (one character).
If OPT=N, PRM specifies the name of the new destination (eight
characters). If OPT=D or OPT=R, PRM should be blank.
General Information
When the DO SYSOUT statement is specified, Control-M/Analyzer tries to execute the DO SYSOUT
instruction.
425
Control-M/Analyzer User Guide
The DO SYSOUT statement can be invoked from an EXECUTE block containing any type of ON statement
(ON CLASS, ON DATA, and so on).
DO SYSOUT processing is performed only on closed sysout files that are in HELD state after being created
by previous steps of the job (for example, FREE=CLOSE was specified in the DD statement that created
the sysout files).
If the FRM (from class) parameter is blank, all of the held output of the job is processed. When the FRM
parameter is specified, only held sysouts that belong to the selected class are processed.
Table 247 Examples of Processing Job Sysout Field Settings
Value Description
OPT=D Delete. The held sysouts of the job are deleted (purged) from the
output queue.
OPT=R Release. The held sysouts of the job are released for printing.
OPT=C PRM=class The held sysouts of the job are moved to the specified output
class. The user must specify an existing, meaningful output class.
OPT=N PRM=newdest The held sysouts of the job are changed to a different output
destination. The user must specify an existing, meaningful output
destination.
Note: At JES3 sites, BMC recommends that the FRM parameter be specified (for example, FRM should not
be blank) because operations on all of the held output of the jobs cannot be performed in one DO
SYSOUT operation. To process the held sysouts of all jobs, specify separate DO SYSOUT statements for
each output class.
Special Considerations
DO SYSOUT requests are accumulated during block execution and performed when the block is exited.
No matter how many times the WHEN block is executed, a DO SYSOUT statement in a WHEN block is
processed only once, because successive executions of the same DO SYSOUT statement would be
meaningless.
"All sysout" operations (for example, DO SYSOUT operations where the FRM parameter is blank) override
specific class operations. For example, if you delete all the sysouts from the job, it does not matter that
other sysout operations have been specified. The entire output of the job is purged. Therefore, take
precaution when mixing specific class operations with "all sysout" operations.
Changing a sysout class to a released class changes the class name. However, it does not release the
sysout because the attributes do not change (according to JES logic). Likewise, changing a sysout class to
a dummy class does not purge the sysout because the attributes do not change (according to JES logic).
426
Control-M/Analyzer User Guide
The results are unpredictable, because the second example produces two JES requests: one for class A
and another for all held output.
Example
Check the output in output class X. If the extracted total matches the Database total, release the report
for printing.
Figure 226 DO SYSOUT Field Example
LIBRARY : CTB.PROD.RULES RULE : RULCURR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER N52A GROUP ACCT
UPDATED 08/08/00 - 08:47:05 BY N52A
DESC CHECK WEEKLY ACCOUNTING REPORT
OPTIONS
===========================================================================
EXECUTE TOTALS UPON C
ON CLASS = X EXTWTR DEST FORM
MODE PG LINECT DATASTAMP
WHEN LINE 001 - 060 COL 025 - 029 STOP AND/OR
STRING = ’TOTAL’
DO EXTRACT = TOTAL
LEVEL LINE +000 COL 0031 - 0041 PROCESS TYP
DO
WHEN LINE 001 - 060 COL 025 - 029 STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE CHECK UPON C
ON DATA
IF TOTAL=DB_TOTAL C
DO SYSOUT OPT R PRM FRM
DO
ELSE
DO PRINT = A PROBLEM IS DETECTED; TOTALS DO NOT MATCH F C
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 08.59.57
427
Control-M/Analyzer User Guide
Type the word TERMINAT (or its abbreviation T) next to the DO in the Rule Definition screen. When
Enter is pressed, the = prompt and the following fields are displayed:
Table 248 DO TERMINAT Statement Fields
Field Description
COD Any valid condition code (or user abend code in case of result
ABEND) between 0000 and 4000. Optional.
General Information
Control-M/Analyzer uses the DO TERMINAT statement to control work flow within a job based on whether
input is in or out of balance. Control-M/Analyzer sends the condition code or user abend code back to the
job itself, that then either continues executing or terminates based on the specified condition code or user
abend code. See your JCL manual for information about the JCL COND parameter.
428
Control-M/Analyzer User Guide
If the execution of a rule definition ends normally (no errors occur) and a DO TERMINAT statement is not
specified, the rule will terminate with the default status specified in the DEFSTAT installation parameter
and the return code specified in the DEFCODE installation parameter. For details, refer to the
Control-M/Analyzer chapter of the INCONTROL for z/OS Installation Guide.
Control-M/Analyzer Database variables are committed (according to the method specified in the DO
COMMIT statement) when the rule terminates. Termination occurs under the following conditions:
If the rule was called by a job step, commitment occurs when the rule terminates.
If the rule was called by another rule (by the DO RULE statement), commitment occurs when the
calling rule terminates.
After termination, processing flow control returns to the entity that invoked the called rule; for example,
to the next job step (in the job that called the rule) or to the calling rule.
Example
The rule terminates NOTOK with a condition code of 0055 if the sum computed is more than
1,000,000.00. Otherwise, the rule terminates OK with a condition code of 0.
Figure 228 DO TERMINAT Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULCURR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
IF SUM > 1000000.00 C
DO SHOUT TO TSO-M18 URGENCY R
= PLEASE CHECK CURRENCY FILE; SUM COMPUTED IS %%SUM
DO REMARK = SUM IS OVER 1000000.00 SUM=%%SUM
DO COND = NOTOK-%%SYSJOBNAME 0704 +
DO TERMINAT = NOTOK COD 0055
DO
ELSE
DO REMARK = SUM IS NOT OVER 1000000.00 SUM=%%SUM
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
429
Control-M/Analyzer User Guide
Mandatory. The EXECUTE statement marks the beginning of an EXECUTE block. The statements after the
EXECUTE statement (but before another EXECUTE statement) constitute the EXECUTE block. An unlimited
number of EXECUTE blocks can be included in a rule. For additional information see EXECUTE Block
Structure Overview (on page 351).
Table 249 EXECUTE Statement Fields
Field Description
General Information
The UPON parameter determines whether the EXECUTE block is performed. If the expression specified by
UPON evaluates to true, the block is processed. Conversely, if the expression evaluates to false, the entire
block is skipped.
430
Control-M/Analyzer User Guide
The EXECUTE block name is used as a point of reference. A DO BLOCK statement causes
Control-M/Analyzer to branch (skip) directly to the specified EXECUTE block name and executes the
subsequent statements. Control-M/Analyzer then returns to the point after the initial DO BLOCK
statement.
Note: For more information about the EXECUTE block name and branching within a rule see DO BLOCK:
Automated Balancing Statement (on page 368).
Examples
Example 1
BMC recommends that EXECUTE block names (that are specified by statement EXECUTE) represent the
purpose of the block. In this example, the first EXECUTE block is called INIT because it performs
initialization procedures. The second EXECUTE block is called INPUT because it extracts data from a file as
input to Control-M/Analyzer variables. These variables are checked in subsequent EXECUTE blocks of the
rule.
Figure 230 DO EXECUTE Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INIT UPON C
ON DATA
ALWAYS
DO SET = CNTR=0 C
DO SET = ERR=0 C
DO PRINT = UNREASONABLE SICK/VACATION DAYS F C
DO PRINT = ================================= F C
DO PRINT = +--+---------------+------+—----+ F C
DO PRINT = | | NAME | SICK | VAC | F C
DO PRINT = +--+---------------+------+-----+ F C
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 015 - 015 TYPE STOP AND/OR
STRING = #
DO EXTRACT = NAME
PLEASE FILL IN RULE DEFINITION. 10.31.08
Example 2
EXECUTE block INPUT extracts information from each line in a file and executes EXECUTE block CHECK to
check each line. EXECUTE block CHECK is located at the end of the rule. If the current line is exceptional
(for example, the employee has taken more than 90 sick days or more than 30 vacation days), a line is
printed to the Control-M/Analyzer Rule Activity report.
431
Control-M/Analyzer User Guide
432
Control-M/Analyzer User Guide
Optional. The GROUP parameter specifies a group name of 1 to 20 characters. Only trailing blanks are
allowed.
General Information
The GROUP parameter is used for convenient handling of rules. It enables the retrieval of information
about a specific rule, usually through the Online Tracking and Control facility or through the Reporting
facility.
The group name appears in all important messages relating to the rule.
Using groups, complete systems may be tested as a unit, for simulation purposes.
When a rule executes, the default group name specified by the GROUP parameter is the group with which
Database variables are accessed.
During rule execution, the group name specification is checked for existence in the Control-M/Analyzer
Database Variable file. Several invocation methods exist that determine the group name under that a rule
executes:
Direct invocation by a job step or program
The group specified by the job step or program is used. If no group is specified by the job step or
program, the GROUP specification in the rule definition is used.
Invocation by mission
GROUP receives its value from the mission definition. In this case, the group name specified by the
mission definition overrides the group name specified by the rule definition.
433
Control-M/Analyzer User Guide
Example
Figure 233 GROUP Statement Example
LIBRARY : CTB.PROD.RULES RULE : CHECKCUR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M55 GROUP CURRENCY
UPDATED 08/08/00 - 09:18:35 BY M55A
DESC CHECK BALANCING OF BANK'S FOREIGN CURRENCY INVESTM
OPTIONS
===========================================================================
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME REPORT JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 020 - 030 COL 001 - 132 STOP AND/OR
STRING = NOT BALANCED
DO SHOUT TO OPER URGENCY R
= FOREIGN CURRENCY REPORT NOT BALANCED !!!
DO TERMINAT = NOTOK COD 1001
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
434
Control-M/Analyzer User Guide
Optional. IF specifies criteria that determine whether subsequent Automated Balancing statements are
executed.
When ON DATA is specified and Enter is pressed, the IF statement can be specified in the area that is
opened on the screen. When IF (or its abbreviation I) is specified and Enter is pressed, the following
fields are displayed:
Table 250 IF Statement Fields
Field Description
435
Control-M/Analyzer User Guide
Field Description
ELSE When ELSE is specified, the DO statements following that ELSE are
performed only when the preceding IF evaluates to false.
An area for specification of the ELSE parameter is opened on the
Rule Definition screen after expression is specified and Enter is
pressed. Type ELSE (or its abbreviation E) in this area and press
Enter. When Enter is pressed, another area is opened for
specification of the ALWAYS and IF parameters, and a field appears
for specification of Automated Balancing statements.
When set to Y (Yes), the C (Continue?) field provides additional space for specifying the IF expression. A
maximum of 9 lines can be opened. Specifying N (No) in the C (Continue?) field closes the IF expression.
General Information
Available only when ON DATA is specified.
When IF evaluates to true, the DO statements after the IF are executed. If that IF is matched by a
corresponding ELSE, the DO statements after the ELSE are not executed.
When IF evaluates to false, the DO statements after that IF are skipped. If that IF is matched by a
corresponding ELSE, the DO statements after that ELSE are executed.
The LABEL parameter is used as a reference point for flow processing (branching). LABEL is used in
conjunction with statement DO GOTO. When specified, DO GOTO passes processing control to the
matching LABEL. See statement DO GOTO in this chapter for additional information.
Examples
Example 1
EXECUTE block BAL determines if a stock order should be issued for items that belong to group 781.
The current on-hand quantity of items in this group was calculated in previous EXECUTE blocks. Using the
IF parameter, the current on-hand quantity amount can be compared to 1000 to determine if a stock
order must be issued.
436
Control-M/Analyzer User Guide
Example 2
In EXECUTE block PROCESS, the current total value (DB_CURRENT_TOTAL) is compared to the same
value from last month's report (DB_CURRENT_TOTAL@G01). This example represents a "run-to-run
check." To verify that the current total value is reasonable, the two values are compared; Their difference
should not be greater than 10,000.
Figure 236 IF Statement – Example 2
LIBRARY : CTB.PROD.RULES RULE : RUNCHK
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE PROCESS UPON C
ON DATA
IF (DB_CURRENT_TOTAL - DB_CURRENT_TOTAL.@G01) > 10000 C
DO SHOUT TO OPER URGENCY R
= -- ADMIN REPORT IS OUT OF BALANCE --- CALL 714-5678 - JOHN
DO TERMINAT = NOTOK COD 1501
DO
ELSE
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
437
Control-M/Analyzer User Guide
Mandatory. Type one of the data source options – CLASS, DB2, DDNAME, DSN, FILE, PAGE, SYSDATA,
SYSOUT, VSAM, DATA – in the ON field and press Enter. If the selected option is valid,
Control-M/Analyzer displays the relevant parameters.
Note: It is usually not necessary to enter the full name of the data source option. The shortest unique
abbreviation of the option is sufficient.
Each ON statement is summarized below and discussed in detail on the following pages.
Table 251 ON STATEMENT Fields
Field Description
ON DB2 Processes data from DB2 tables using the dynamic SQL facility.
438
Control-M/Analyzer User Guide
Field Description
ON SYSDATA For Control-M and Control-M/Restart users: Processes the three job
sysout datasets referred to as SYSDATA.a SYSDATA is available to
the current job when Control-M/Analyzer is invoked by the
Control-M monitor (by statement DO CTBRULE in a job scheduling
definition).
General Information
Each EXECUTE block must contain only one ON statement. An ON statement is comprised of the ON
parameter and Data Identification statements. Different Data Identification statements are displayed
depending on which ON statement is specified.
All ON statements (except ON DATA) display MODE, LINECT, and DATASTAMP parameters, plus Data
Identification statement WHEN, which provides conditional execution of subsequent statements based on
Data Identification criteria.
See Datastamp Calculation (on page 442) for information about creating unique datastamps. For
information about using datastamps, seeDATASTAMP: Functions (on page 286).
The ON DATA statement does not display MODE, LINECT, DATASTAMP, or WHEN parameters. Instead,
conditional or unconditional execution of subsequent statements is provided using IF or ALWAYS Data
Identification statements. For more information, see IF: Data Selection Statement (on page 435), and
ALWAYS: Data Identification Statement (on page 358).
439
Control-M/Analyzer User Guide
Examples
Example 1
EXECUTE block INPUT processes sequential file CTB.PROD.EMPREP.
Figure 238 ON Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 015 - 015 STOP AND/OR
STRING = #
DO EXTRACT = NAME
LEVEL 0 LINE +000 COL -002 - +013 PROCESS TYP
DO EXTRACT = SICK
LEVEL 0 LINE +000 COL +087 - +088 PROCESS TYP
DO EXTRACT = VAC
LEVEL 0 LINE +000 COL +093 - +094 PROCESS TYP
DO BLOCK = CHECK ARG NAME,SICK,VAC C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE FIN UPON C
ON DATA
PLEASE FILL IN RULE DEFINITION. 16.00.22
440
Control-M/Analyzer User Guide
Example 2
Statement ON CLASS in the first EXECUTE block identifies the output of class X as the source of the
information to be balanced. This information is compared with corresponding information from the
previous run by statement ON DATA in EXECUTE block PROCESS.
Figure 239 ON Statement – Example 2
LIBRARY : CTB.PROD.RULES RULE : RUNCHK
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE EXTRACT UPON C
ON CLASS = X EXTWTR DEST FORM
MODE PG LINECT 0060
WHEN LINE 004 - 020 COL 001 - 080 STOP AND/OR
STRING = TOTALS:
DO EXTRACT = DB_CURRENT_TOTAL
LEVEL LINE +000 COL +002 - +008 PROCESS TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE PROCESS UPON C
ON DATA
LABEL:
IF (DB_CURRENT_TOTAL - DB_CURRENT_TOTAL@G01)> 10000 C
DO SHOUT TO OPER URGENCY R
= — REPORT IS OUT OF BALANCE —- CALL 714-5678 - JOHN SMITH
DO TERMINAT = NOTOK COD 1501
DO
ELSE
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
441
Control-M/Analyzer User Guide
Datastamp Calculation
Datastamps are unique identifiers that can be assigned to files whenever any ON statement (other than
ON DATA) is executed.
Calculating Datastamps
As a default, a Datastamp is not calculated. Performance is significantly improved when Datastamp
processing is not performed. To avoid Datastamp processing, leave the DATASTAMP parameter blank
in the ON statement that identifies the file that does not require a datastamp. See "Example 1" below
for a sample rule that does not perform Datastamp processing.
When Datastamp processing is necessary, the datastamp can be calculated more efficiently by setting
the DATASTAMP parameter to 2 in the ON statement that identifies the file that needs to receive a
unique identifier. See "Example 2" below for a sample rule specifying DATASTAMP 2.
Datastamp processing can also be performed according to the original method for compatibility
purposes. To request original Datastamp processing, set the DATASTAMP parameter to 1 in the ON
statement that identifies the file that needs to receive a unique identifier. See "Example 3" below for a
sample rule specifying DATASTAMP 1.
Example 1
A Datastamp is not calculated for ON DDNAME because the DATASTAMP parameter is blank in the ON
statement.
Figure 240 ON Statement DATASTAMP Parameter – Example 1
LIBRARY : CTBP.PROD.RULES RULE : CALCSTAM
COMMAND ===> SCROLL===> CRSR
+-------------------------------------------------------------------------------+
OWNER N43 GROUP ACCOUNTING
UPDATED 08/08/00 - 13:25:57 BY M43
DESC
OPTIONS
==============================================================================
EXECUTE NOCOMPAR UPON C
ON DDNAME DDNAME ACCTENTR
MODE DS LINECT DATASTAMP 2
WHEN LINE 010 - 010 COL 015 - 025 STOP AND/OR
STRING = TOTAL:
DO EXTRACT = MTOTAL
LEVEL LINE +000 COL 0027 - 0040 PROCESS BKUNPK TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE UPON C
ON
PLEASE FILL IN RULE DEFINITION. 13.32.52
442
Control-M/Analyzer User Guide
Example 2
A unique DATASTAMP is calculated by the new method because DATASTAMP 2 is specified in the ON
statement.
Figure 241 ON Statement DATASTAMP Parameter – Example 2
LIBRARY : CTBP.PROD.RULES RULE : ORIGINAL
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
OWNER N43 GROUP ACCOUNTING
UPDATED 08/08/00 - 13:25:57 BY M43
DESC
OPTIONS
=============================================================================
EXECUTE DOCOMPAR UPON C
ON DDNAME DDNAME ACCTENTR
MODE DS LINECT DATASTAMP 2 2
WHEN LINE 010 - 010 COL 015 - 025 STOP AND/OR
STRING = TOTAL:
DO EXTRACT = MTOTAL
LEVEL LINE +000 COL 0027 - 0040 PROCESS BKUNPK TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===============================================================================
EXECUTE SAMEFILE UPON C
ON DATA
IF DATASTAMP(DOCOMPAR)=DB_LASTCOMPARE C
DO PRINT = THE FILES ARE THE SAME F C
DO
ELSE
DO PRINT = THE FILES ARE NOT THE SAME F C
DO
(ENTER "ALWAYS", "IF")
===============================================================================
EXECUTE UPON C
ON
PLEASE FILL IN RULE DEFINITION. 13.32.52
443
Control-M/Analyzer User Guide
Example 3
A unique DATASTAMP is calculated by the original method because DATASTAMP 1 is specified in the ON
statement.
Figure 242 ON Statement DATASTAMP Parameter – Example 3
LIBRARY : CTBP.PROD.RULES RULE : ORIGINAL
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
OWNER N43 GROUP ACCOUNTING
UPDATED 08/08/00 - 13:25:57 BY M43
DESC
OPTIONS
================================================================================
EXECUTE DOCOMPAR UPON C
ON DDNAME DDNAME ACCTENTR
MODE DS LINECT DATASTAMP 1
WHEN LINE 010 - 010 COL 015 - 025 STOP AND/OR
STRING = TOTAL:
DO EXTRACT = MTOTAL
LEVEL LINE +000 COL 0027 - 0040 PROCESS BKUNPK TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===============================================================================
EXECUTE SAMEFILE UPON C
ON DATA
IF DATASTAMP(DOCOMPAR)=DB_LASTCOMPARE C
DO PRINT = THE FILES ARE THE SAME F C
DO
ELSE
DO PRINT = THE FILES ARE NOT THE SAME F C
DO
(ENTER "ALWAYS", "IF")
===============================================================================
EXECUTE UPON C
ON
PLEASE FILL IN RULE DEFINITION. 13.32.52
444
Control-M/Analyzer User Guide
Type the word CLASS (or its abbreviation CL) to the right of the ON in the Rule Definition screen. When
Enter is pressed, the = prompt and the following fields are displayed:
445
Control-M/Analyzer User Guide
Field Description
class Name of the class of specified sysouts. The class value can have a
maximum of 8 characters. Mandatory.
FORM Name of a printing form for reports. FORM can have a maximum of
4 characters. Optional.
MODE Determines the starting point for calculating statement WHEN line
and column specifications. See statement WHEN in this chapter.
Optional. Available modes are:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
General Information
ON CLASS processes outputs (sysouts) of previous steps in the current job. For Control-M/Analyzer to
process these sysouts, the output must be in HELD state and FREE=CLOSE must be specified in the DD
statement that created the output.
See the Control-M/Analyzer chapter of the INCONTROL for z/OS Installation Guide for a discussion of
HELD sysout processing under JES3.
446
Control-M/Analyzer User Guide
ON CLASS selects all outputs with a class that matches one of the specified classes. A maximum of eight
classes may be specified by listing them one after the other.
ON CLASS accepts additional subparameters that further limit the selection of sysouts from the specified
classes. Valid subparameters are shown in Table 253.
Table 253 ON CLASS Additional Subparameters
Subparameter Description
EXTWTR Only sysouts from the specified EXTWTR of a specified CLASS are
processed.
DEST Only sysouts for the specified DEST of a specified CLASS are
processed.
FORM Only sysouts for the specified FORM of a specified CLASS are
processed.
Control-M/Analyzer AutoEdit and Local variables can be embedded in the CLASS, EXTWTR, DEST, and
FORM parameters. The variables are resolved (replaced) at time of rule execution. For additional
information on AutoEdit processing, see Chapter 3, "Control-M/Analyzer Variables."
Example
EXECUTE block EXTRACT processes reports in class X. Information is extracted from the report and
compared with data from a previous report in EXECUTE block PROCESS.
Figure 244 ON CLASS Statement Example
LIBRARY : CTB.PROD.RULES RULE : RUNCHK
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE EXTRACT UPON C
ON CLASS = X EXTWTR DEST FORM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 004 - 020 COL 001 - 080 STOP AND/OR
STRING = TOTALS:
DO EXTRACT = DB_CURRENT_TOTAL
LEVEL 0 LINE +000 COL +002 - +008 PROCESS TYP
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE PROCESS UPON C
ON DATA
IF (DB_CURRENT_TOTAL - DB_CURRENT_TOTAL@G01)> 10000 C
DO SHOUT TO OPER URGENCY R
= -- REPORT IS OUT OF BALANCE —- CALL 714-5678 - JOHN SMITH
DO TERMINAT = NOTOK COD 1501
DO
PLEASE FILL IN RULE DEFINITION. 15.11.23
447
Control-M/Analyzer User Guide
Type the word COMPARE (or its abbreviation CO) after the ON in the Rule Definition screen, and press
Enter. The following fields are displayed:
Table 254 ON COMPARE Statement Fields
Field Description
SOURCE1 Specification for the first data source. Mandatory. The value Y (yes)
must be specified for one and only one of the FILE, SYSOUT, or DD
subparameters.
448
Control-M/Analyzer User Guide
Field Description
PROCESS Indicates whether each line is subject to modification before being sent
to the Differences algorithm (described below). Valid values are:
Y (Yes)
N (No). Default.
If Y is specified, the BUILTIN and USERBLOCK subparameters are
displayed and a valid built-in process or a valid user block name must
be specified.
449
Control-M/Analyzer User Guide
Field Description
SOURCE2 Specification for the second data source. Mandatory. The same
subparameter descriptions apply to both SOURCE1 and SOURCE2. See
the descriptions above for information about SOURCE2 subparameters.
MODE Starting point for line and column values. Optional. Valid values are:
DS – Line and column values are calculated from the beginning of
the dataset.
PG – Line and column values are calculated from the beginning of
the page.
If a value is not specified, the value DS is automatically inserted.
LINECT Number of lines per printed page. Optional. Minimum: 1. Default: 60.
450
Control-M/Analyzer User Guide
General Information
Control-M/Analyzer reads the data sources identified in SOURCE1 and SOURCE2, line by line, and sends
each line to the ON COMPARE Differences algorithm. However, if a Process has been specified for a data
source, the input line is processed accordingly before it is sent to the Differences algorithm (for
example, the Process may change the line using substitute masks, function SUBSTR, string concatenation,
and/or some other mechanism). In this case, the modified (for example, processed) input line is sent to
the Differences algorithm.
After Control-M/Analyzer has sent all input lines to the Differences algorithm, the Differences algorithm
searches for the longest identical sequence of lines in both files to synchronize changes. The algorithm is
implemented recursively until all identical lines have been found.
For each remaining (non-identical) line, Control-M/Analyzer performs the WHEN block (see diagram
below). In the WHEN block, the SYSCURLINE system variable holds the current line and the logical DIFF
line indicates the following information:
Table 255 Contents of DIFF Line After ON COMPARE Processing
Datum Description
SOURCE1 LINE NUMBER / Line number of the current line from data source 1, or line
RANGE range of the replaced lines.
SOURCE2 LINE NUMBER / Line number of the current line from data source 2, or line
RANGE range of the replaced lines.
The ON COMPARE block cannot contain ON, DO TERMINAT, DO RULE, or DO EXIT statement types:.
The following source restrictions are applicable:
The SYSOUT parameter can be used only once in an ON COMPARE statement (for example, to specify
SOURCE1 or SOURCE2, but not both).
The SYSOUT parameter can only specify a sysout that was closed before the current step began.
The FILE and DD Parameters can specify a file that was created in the current step if the file is closed
before the ON COMPARE block is invoked.
Based on these source restrictions, sysouts can be compared by the following methods:
451
Control-M/Analyzer User Guide
To compare the sysout of the current job with another sysout, specify the current sysout by the DD
parameter and the other sysout by the SYSOUT parameter.
To compare two sysouts when neither is of the current job, copy one sysout to a file, specify that file
using the FILE parameter, and specify the other sysout using the SYSOUT parameter.
MSUBSTMASK Function
MSUBSTMASK is a function that can execute multiple substitution commands contained in the file
referenced by the DD statement specified as its first argument. The format of the MSUBSTMASK function
is:
MSUBSTMASK (ddname,long-string-variable)
where long-string-variable contains the string that is currently being processed. The file referenced by
ddname can, for example, contain the following line:
SUBSTFROM '(???) ???-????' SUBSTTO '???-???-????' EOS
where EOS, which means "end of substitution," is mandatory at the end of each substitution statement.
Example
This example illustrates how function MSUBSTMASK can be used to modify strings in a USERBLOCK
process (SUBSDATE) by removing the first 2 digits in the year field.
Figure 246 ON COMPARE Statement Example
EXECUTE 'RECONCIL'
ON_COMPARE
SOURCE1
DD 'DDBEFORE' PROCESS USERBLOCK 'SUBSDATE'
SOURCE2
DD 'DD#AFTER'
WHEN FLINE 1 TLINE 80 FCOL 1 TCOL 80 SEARCH '.AL.'
DO EXTRACT 'DIFFDESC' LEVEL 0 LINE +0 FCOL 1 TCOL 80
DO PRINT DATA '%%DIFFDESC'
EXECUTE 'END'
ON_DATA
ALWAYS
DO TERMINATE RESULT OK USER-CODE 0
EXECUTE 'SUBSDATE'
ON_DATA
ALWAYS
DO SET 'RC' EVAL 'MSUBSTMASK(''DDSUBST'',SYSCURLINE)'
SYSCURLINE is the long-string variable that contains the string that is currently being processed.
DDSUBST is enclosed by double quotes because the MSUBSTMASK function is enclosed by single quotes
inside a DO SET statement. DDSUBST contains the following lines:
//DDSUBST DD *
SUBSTFROM '??/??/19??' SUBSTTO '??/??/??' EOS
SUBSTFROM '??/??/20??' SUBSTTO '??/??/??' EOS
/*
For an example of how function MSUBSTMASK can be used for converting currencies, see D Euro
Support (on page 678).
452
Control-M/Analyzer User Guide
Logical DIFF line is the output of the DIFF algorithm. The line format is:
453
Control-M/Analyzer User Guide
where:
I/D/R indicates INSERTED/DELETED/REPLACED lines
SOURCE1 line/range is the current line number or range of lines, in source1
SOURCE2 line/range is the current line number or range of lines, in source2
Example Outputs
I,LINE#SOURCE1=0000024,LINE#SOURCE2=0000023
END OF REPORT
454
Control-M/Analyzer User Guide
455
Control-M/Analyzer User Guide
Example 2
Substitute dates in specific columns with a user block. Compare the rest of the line as is.
Table 257 ON COMPARE Input Data – Example 2
DO BEFORE
GLOBAL BANK INC.
PAGE: 1
*******************************
C U S T O M E R L I S T I N G
*******************************
456
Control-M/Analyzer User Guide
Note: After reconstructing the line, the lengths of the SOURCE1 and SOURCE2 lines must remain the
same in order for the comparison to determine that they are identical.
For examples of how the ON COMPARE statement can be used for converting currencies, see D Euro
Support (on page 678).
457
Control-M/Analyzer User Guide
Type the word DATA (or its abbreviation DA) next to the ON label in the Rule Definition screen. When
Enter is pressed, an area is opened on the screen for specification of Data Identification statement IF or
ALWAYS.
Note: If DATA is accidentally specified, another data source type can be specified next to the ON in the
Rule Definition screen only after the contents of the ON field are erased. Erase the contents of the ON
field, and press Enter. Then specify the new data source type (by typing CLASS, COMPARE, DB2,
DDNAME, DSN, FILE, PAGE, SYSDATA, SYSOUT or VSAM) in the ON field.
General Information
The ON DATA statement processes information stored in Control-M/Analyzer Database, AutoEdit, Local,
and System variables.
ON DATA does not display the WHEN Data Identification statement. Instead, conditional or unconditional
execution of a group of processing statements is provided using the IF or ALWAYS Data Identification
statements. For more information, see IF: Data Selection Statement (on page 435) and ALWAYS: Data
Identification Statement (on page 358).
The DO EXTRACT statement is not available in an EXECUTE block that contains an ON DATA statement.
458
Control-M/Analyzer User Guide
Examples
Example 1
EXECUTE block INIT performs certain initialization steps before processing the report. These steps should
be performed every time the rule is invoked. Therefore, ON DATA statement ALWAYS is specified.
Figure 253 ON DATA Statement – Example 1
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INIT UPON C
ON DATA
ALWAYS
DO SET = CNTR=0 C
DO SET = ERR=0 C
DO PRINT = UNREASONABLE SICK/VACATION DAYS F C
DO PRINT = ================================= F C
DO PRINT = +--+---------------+------+-----+ F C
DO PRINT = | NAME | SICK | VAC | F C
DO PRINT = +--+---------------+------+-----+ F C
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTB.PROD.EMPREP
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 013 - 014 STOP AND/OR
STRING = .AL.
DO EXTRACT = NAME
PLEASE FILL IN RULE DEFINITION. 16.48.58
Example 2
The EXECUTE block CHECK processes Control-M/Analyzer variables. This rule uses statement IF to
determine which DO statements to execute depending on the value of Control-M/Analyzer variable SUM.
Figure 254 ON DATA Statement – Example 2
LIBRARY : CTB.PROD.RULES RULE : RULCURR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
EXECUTE CHECK UPON C
ON DATA
ALWAYS
DO PRINT = TOTAL SUM IS : %%SUM F C
DO
IF SUM > 1000000.00 C
DO SHOUT TO U-M18 URGENCY R
= PLEASE CHECK CURRENCY FILE; SUM COMPUTED IS %%SUM
DO REMARK = SUM IS OVER 1000000: SUM=%%SUM
DO COND = NOTOK-%%SYSJOBNAME 0704 +
DO TERMINAT = NOTOK COD 0055
DO
ELSE
DO REMARK = SUM IS NOT OVER 1000000: SUM=%%SUM
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
PLEASE FILL IN RULE DEFINITION. 16.44.10
459
Control-M/Analyzer User Guide
Example 3
This is an example of a cross-run comparison. EXECUTE block PROCESS uses statement IF to compare
the current and previous values of Control-M/Analyzer Database variable CURRENT_TOTAL.
Figure 255 ON DATA Statement – Example 3
LIBRARY : CTB.PROD.RULES RULE : RUNCHK
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE PROCESS UPON C
ON DATA
IF (DB_CURRENT_TOTAL - DB_CURRENT_TOTAL@G01)> 10000 C
DO SHOUT TO OPER URGENCY R
= -- REPORT IS OUT OF BALANCE --- CALL 714-5678 - JOHN SMITH
DO TERMINAT = NOTOK COD 1501
DO
ELSE
DO TERMINAT = OK COD 0000
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
460
Control-M/Analyzer User Guide
Type DB2 (or its abbreviation DB) to the right of ON in the Rule Definition screen. When Enter is
pressed, the following fields are displayed:
Table 258 ON DB2 Statement Fields
Field Description
MODE Determines the starting point upon which absolute WHEN line and
column specifications are based. (See WHEN: Rule Definition
Structure (on page 488).) Optional. Available modes are:
DS (Dataset)–Line and column values are based on the start of
the dataset.
PG (Page)–Line and column values are based on the start of the
page. Default.
461
Control-M/Analyzer User Guide
Field Description
LINECT Specifies the number of lines per printed page. Optional. If not
specified, the default is 60.
General Information
The SQL statement must be a valid DB2 SQL SELECT statement. For additional information see the IBM
Database 2 (DB2), Application Programming and SQL Guide.
Note: The word SELECT is assumed. Do not include the word SELECT as part of the SQL SELECT
statement.
Control-M/Analyzer AutoEdit and Local variables may be embedded in the subparameters. The variables
are resolved (replaced) at time of rule execution. For additional information about AutoEdit processing see
Control-M/Analyzer Variables (on page 222).
462
Control-M/Analyzer User Guide
Table 259 Commonly-Used DB2 Field Types and Control-M/Analyzer Built-In Process
Used by DO EXTRACT to Extract their Values
DECIMAL(p,s) Decimal value. Precision (p) is the total INT (p/2+0.5) BUNPKs
NUMERIC(p,s) number of digits. Scale (s) is the
number of digits after the implied
decimal point.
TIMESTAMP Date and time (as previously defined by 26 (including None required
DATE and TIME type fields)a microseconds)
All field types that may contain a NULL value (NULL=YES as defined in DB2) include an additional X ‘00’ at
the end of the field. Therefore, the field length for these field types should be increased by one. The
maximum length of a value that Control-M/Analyzer can extract is 100 bytes. When extracting fields from
DB2 files, BMC recommends that each field be extracted individually. Do not extract an entire line from a
DB2 file into one field. If a field in the DB2 table is empty (NULL), the field is padded with X ‘00’ when
extracted by Control-M/Analyzer.
To receive information on DB2 table column lengths and types, the database administrator can issue the
following DB2 command:
SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBCREATOR='creator' AND TBNAME='name';
where
SYSIBM.SYSCOLUMNS is the name of the DB2 system table that describes every column of every
defined table.
name is the name of a DB2 table.
creator is the creator of a DB2 table.
463
Control-M/Analyzer User Guide
Example
Assume the following employee table EMPTABLE exists:
Table 260 Contents of EMPTABLE for ON DB2 Statement Example
DB2 Control-M/
Field Analyzer Field
Field Name Description Field Type Nulls Length Length
The following rule definition instructs Control-M/Analyzer to retrieve and print information about
employees whose salaries are over 3,000:
Figure 257 ON DB2 Statement Example
LIBRARY : CTBP.PROD.RULES RULE : EMPSAL
COMMAND ===> SCROLL===>CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP PERSONNEL
UPDATED 08/08/00 - 10:20:09 BY M43
DESC
OPTIONS
================================================================================
EXECUTE GETAVG UPON C
ON DB2 SUBSYSTEM ID S111
SQL SELECT EMPNAME,SALARY FROM EMPTABLE WHERE SALARY>3000 C
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 001 - 001 STOP AND/OR
STRING = .AL.
DO EXTRACT = EMPNAME
LEVEL LINE +000 COL 0003 - 0022 PROCESS TYP
DO EXTRACT = EMPSALARY
LEVEL LINE +000 COL 0023 - 0027 PROCESS BUNPK2 TYP
DO PRINT = %%EMPNAME %EMPSALARY F C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
=================================================================================
EXECUTE UPON C
PLEASE FILL IN RULE DEFINITION. 11.42.28
In the example:
Extraction of the EMPNAME field starts at column 3, even though according to its width, it should
begin at column 1. This is because the EMPNAME field is of type VARCHAR, and the first two bytes,
columns 1 and 2, contain the length of the field.
Built-in process BUNPK2 is used to extract the employee salary and rank.
464
Control-M/Analyzer User Guide
Type DDNAME (or its abbreviation DD) to the right of ON in the Rule Definition screen. When Enter is
pressed, the following fields are displayed:
Table 261 ON DDNAME Statement Fields
Field Description
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available values are:
DS (Dataset) – Line and column values are based on the start of
the dataset.
PG (Page) – Line and column values are based on the start of
the page. Default.
465
Control-M/Analyzer User Guide
General Information
Control-M/Analyzer processes the sequential dataset referenced by the specified DD name in the current
step (that is, the Control-M/Analyzer invocation step, or a step executing an application program that
invokes Control-M/Analyzer by a program call).
To check temporary files created by previous steps, pass these files to the Control-M/Analyzer invocation
step with JCL parameter DISP=PASS.
Control-M/Analyzer AutoEdit and Local variables can be embedded in the DDNAME parameter. The
variables are resolved (replaced) at time of rule execution. For additional information on AutoEdit
processing see Control-M/Analyzer Variables (on page 222).
Example
The ON DDNAME statement identifies the report created in the current step that is referenced by DD
statement REPORT.
Figure 259 ON DDNAME Statement Example
LIBRARY : CTB.PROD.RULES RULE : ONDDNAME
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON DDNAME DDNAME REPORT
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 010 - 020 STOP AND/OR
STRING = /
DO EXTRACT = SALARY
LEVEL 0 LINE +000 COL +002 - +008 PROCESS TYP
DO BLOCK = CHECK ARG SALARY C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE CHECK UPON BARG01 < 1000 | BARG01 > 20000 C
ON DATA
ALWAYS
DO PRINT = %%BARG01 F C
DO
(ENTER "ALWAYS", "IF")
PLEASE FILL IN RULE DEFINITION. 16.30.11
466
Control-M/Analyzer User Guide
Type the word DSN (or its abbreviation DS) to the right of ON in the Rule Definition screen. When Enter
is pressed, the = prompt and the following fields are displayed:
Table 262 ON DSN Statement Fields
Field Description
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available modes are:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
467
Control-M/Analyzer User Guide
Field Description
General Information
ON DSN processes all compressed sysouts that meet the selection criteria specified in the ON DSN field.
The selection criteria specified must be a valid Compressed Dataset Access Method (CDAM) retrieval
parameter such as PREFIX or PGMSTEP. For a list of all valid CDAM parameters, see the Control-D User
Guide or the Control-V User Guide. It is possible to process CDAM files created by the Control-D monitor
during decollation or files created by applications that write to CDAM directly.
Note: Rules that contain an ON DSN statement that refers to a CDAM file can properly function only when
the CDAM file line length is 300 characters or less.
Example
The ON DSN statement identifies a compressed dataset referenced by DD statement REPORT in program
step STEP5 with higher level dataset name qualifier SALARY.
Figure 261 ON DSN Statement Example
LIBRARY : CTB.PROD.RULES RULE :CHKSAL
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON DSN = PREFIX=SALARY,DDNAME=REPORT,PGMSTEP=STEP5
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 0060 COL 010 - 020 STOP AND/OR
STRING = /
DO EXTRACT = SALARY
LEVEL 0 LINE +000 COL +002 - +008 PROCESS TYP
DO BLOCK = CHECK ARG SALARY C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE CHECK UPON BARG01 < 1000 | BARG01 > 20000 C
ON DATA
LABEL:
ALWAYS
DO PRINT = %%BARG01 F C
DO
PLEASE FILL IN RULE DEFINITION. 16.30.50
468
Control-M/Analyzer User Guide
Type the word FILE (or its abbreviation F) to the right of ON in the Rule Definition screen. When Enter is
pressed, the following fields are displayed:
Table 263 ON FILE Statement Fields
Field Description
FILENAME Specifies the name of the sequential dataset. FILENAME can have a
maximum of 44 characters. Mandatory.
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available modes are:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
469
Control-M/Analyzer User Guide
General Information
Control-M/Analyzer dynamically allocates the sequential dataset or PDS member. Allocation is in shared
mode. The dataset must exist and be cataloged.
Control-M/Analyzer AutoEdit and Local variables can be embedded in the FILENAME parameter. The
variables are resolved (replaced) at time of rule execution. For additional information on AutoEdit
processing see Control-M/Analyzer Variables (on page 222).
Example
EXECUTE block INPUT processes the sequential file named CTB.PROD.EMPREP. The file is read line by
line. Employee details are extracted from each line that contains the symbol "#" in column 15.
Figure 263 ON FILE Statement Example
LIBRARY : CTB.PROD.RULES RULE : RULEMP
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
===========================================================================
EXECUTE INPUT UPON C
ON FILE FILENAME CTBT.PROD.EMPRE
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 060 COL 015 - 015 STOP AND/OR
STRING = #
DO EXTRACT = NAME
LEVEL 0 LINE +000 COL -002 - +013 PROCESS TYP
DO EXTRACT = SICK
LEVEL 0 LINE +000 COL +087 - +088 PROCESS TYP
DO EXTRACT = VAC
LEVEL 0 LINE +000 COL +093 - +094 PROCESS TYP
DO BLOCK = CHECK ARG NAME,SICK,VAC C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE FIN UPON C
ON DATA
PLEASE FILL IN RULE DEFINITION. 16.00.22
470
Control-M/Analyzer User Guide
Type the word PAGE (or its abbreviation P) to the right of ON in the Rule Definition screen. When Enter
is pressed, the following fields are displayed:
471
Control-M/Analyzer User Guide
Field Description
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available modes are:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
General Information
Control-M/Analyzer processes each page that the Control-D or Control-V monitor passes (for example,
each page that matches Control-D or Control-V WHEN criteria). The rule is executed once for each page.
ON PAGE can be specified in rule definitions that are invoked by statement DO CTBRULE in a Control-D or
Control-V decollating mission definition. Within the rule definition, Control-M/Analyzer System variable
SYSOPT contains one of the following values when Control-M/Analyzer is invoked by Control-D or
Control-V:
472
Control-M/Analyzer User Guide
Value Description
CTDFIRST Control-D or Control-V has started scanning report pages but report
pages have not yet been sent to Control-M/Analyzer.
CTDWORK CDAM pages that match Control-D or Control-V WHEN criteria are
being sent to and processed by Control-M/Analyzer.
The ON PAGE statement is executed only when SYSOPT=CTDWORK is specified in the UPON statement of
the EXECUTE block.
For additional information see Interface to Control-D and Control-V (on page 637).
Example
EXECUTE block GETTOTAL processes each CDAM page received from the Control-D or Control-V monitor
during report decollation. The invoice total on each page is extracted and totalled.
Figure 265 ON PAGE Statement Example
LIBRARY : CTB.PROD.RULES RULE : ADDTOTAL
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP INVOICING
UPDATED 08/08/00 - 11:53:45 BY M43A
DESC CALCULATE AMOUNT DUE THE COMPANY BASED ON INVOICES
OPTIONS
===========================================================================
EXECUTE GETTOTAL UPON SYSOPT='CTDWORK' C
ON PAGE
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 012 - 060 COL 050 - 060 STOP AND/OR
STRING = TOTAL DUE
DO EXTRACT = INVTOTAL
LEVEL 0 LINE +000 COL 0061 - 0075 PROCESS TYP SU
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE CHECKTOT UPON SYSOPT='CTDLAST' C
ON DATA
IF INVTOTAL=DB_INVTOTAL C
PLEASE FILL IN RULE DEFINITION. 12.09.28
473
Control-M/Analyzer User Guide
Type the word SYSDATA (or its abbreviation SYSD) next to the ON in the Rule Definition screen. When
you press Enter, the following fields are displayed:
474
Control-M/Analyzer User Guide
Field Description
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available modes:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
General Information
Control-M/Analyzer processes the three SYSDATA datasets that the Control-M monitor archives (if
Control-M/Restart is also installed) when analyzing job runs. These datasets include: job log (console
messages), expanded JCL, and system output messages.
ON SYSDATA can be specified in rule definitions that are invoked by the DO CTBRULE statement in a
Control-M job scheduling definition. Control-M/Analyzer is invoked each time the DO CTBRULE statement
is encountered in the job scheduling definition.
If a DO CTBRULE statement follows ON PGMST ANYSTEP in the job scheduling definition,
Control-M/Analyzer is invoked once. See the discussion about the Scheduling Definition Facility in the
Control-M for z/OS User Guide for more information.
Within the rule definition, Control-M/Analyzer System variable SYSOPT contains the value CTMWORK if
the rule was invoked by Control-M. For additional information see Interface to Control-M (on page 633).
Example
EXECUTE block GETTIME extracts the execution time of the job that invoked Control-M/Analyzer by
analyzing the job sysouts. If the job execution time exceeds half an hour, a message is "shouted"
recommending that the job be run at night.
475
Control-M/Analyzer User Guide
476
Control-M/Analyzer User Guide
Type the word SYSOUT (or its abbreviation SYSO) next to the ON in the Rule Definition screen. When
Enter is pressed, the following fields are displayed:
Table 267 ON SYSOUT Statement Fields
Field Description
MODE Determines the starting point for calculating WHEN statement line
and column specifications. See WHEN: Rule Definition Structure (on
page 488). Optional. Available modes are:
DS (Dataset) — Line and column values are based on the start
of the dataset.
PG (Page) — Line and column values are based on the start of
the page. Default.
477
Control-M/Analyzer User Guide
Field Description
General Information
Control-M/Analyzer reads the specified sysout according to the specified DD name, procedure step, and
program step. The sysout must have been written by a previous step.
When ON SYSOUT is specified, the output must be in HELD state and FREE=CLOSE must be specified in
the DD statement that references the output.
ON SYSOUT can be specified under both JES2 and JES3.
Control-M/Analyzer AutoEdit and Local variables can be embedded in the PROCSTEP, PGMSTEP, DDNAME,
and JOBNM parameters. The variables are resolved (replaced) at time of rule execution. For additional
information on AutoEdit processing see Control-M/Analyzer Variables (on page 222).
If the JOBNM parameter is not specified, the sysout of the current job is processed. Otherwise, the job
name of every sysout in the system is examined to find the most recently produced sysout with the
specified job name. If the specified job name is not found, no sysout is processed.
478
Control-M/Analyzer User Guide
Example
EXECUTE block INIT processes the sysout file referred to by DD statement SYSUT2 in program step
STEP2 of job WRHSE1.
Figure 269 ON SYSOUT Statement Example
LIBRARY : CTB.PROD.RULES RULE : CHKINV
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M42 GROUP WHSE
UPDATED 08/08/00 - 17:34:49 BY M42
DESC
OPTIONS
============================================================================
EXECUTE INIT UPON C
ON SYSOUT PROCST PGMST STEP2 DDNAME SYSUT2 JOBNM WRHSE1
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 001 - 050 COL 001 - 080 STOP AND/OR
STRING = WAREHOUSE NO:
DO EXTRACT = WAREHOUSE_NUMBER
LEVEL 0 LINE +000 COL +001 - +002 PROCESS TYP
DO = F C
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
479
Control-M/Analyzer User Guide
Type the word VSAM (or its abbreviation V) next to the ON in the Rule Definition screen. When Enter is
pressed, the following fields appear:
Table 268 ON VSAM Statement Fields
Field Description
FIRSTKEY Key of the first KSDS file record or RBA of the first RRDS/ESDS file
record to be processed. Optional. If FIRSTKEY is blank, processing
starts from the first record in the file.
The C (Continue?) field, when set to Y (Yes), provides additional
space for specifying the FIRSTKEY field. A maximum of six lines may
be opened for this field. Specifying N (No) in the C (Continue?) field
closes the following preexisting line.
LASTKEY Key of the last KSDS file record or RBA of the last RRDS/ESDS file
record to be processed. Optional. If LASTKEY is blank, processing
ends with the last record in the file. The last record is read by
Control-M/Analyzer.
The C (Continue?) field, when set to Y (Yes), provides additional
space for specifying the LASTKEY field. A maximum of six lines may
be opened for this field. Specifying N (No) in the C (Continue?) field
closes the following preexisting line.
T VSAM file type. Valid values are: ESDS, RRDS and KSDS.
480
Control-M/Analyzer User Guide
Field Description
MODE Determines the starting point upon which absolute WHEN line and
column specifications are based. For more information, see WHEN:
Rule Definition Structure (on page 488). Optional. Available modes
are:
DS (Dataset) – Line and column values are based on the start of
the dataset.
PG (Page) – Line and column values are based on the start of
the page. Default.
LINECT Specifies the number of lines per printed page. Optional. If not
specified, Control-M/Analyzer assumes a value of 60.
General Information
FIRSTKEY and LASTKEY should be composed of a concatenation of fields only of the following types:
Table 269 Legal Field Types for Composition of FIRSTKEY and LASTKEY Fields
Type Description
Note: For packed decimal and/or zoned decimal support, use the hexadecimal representation of these
numbers.
The key value is created by concatenation of the strings. This way, a key that contains both alphanumeric
and hexadecimal strings can be specified.
If the specified key is shorter than the actual KEYLEN of the VSAM file, the specified key is padded by
hexadecimal ‘00’ characters for FIRSTKEY and hexadecimal ‘FF’ characters for LASTKEY. This enables
GENKEY access.
481
Control-M/Analyzer User Guide
The output of ON VSAM is identical to the output of the IDCAMS REPRO command, specified with similar
parameters (for example, you can extract the information with reference to the original columns in the
VSAM file in accordance with the record layout). Please refer to the IBM VSAM Administration Guide for
additional information on the REPRO command.
Examples
Example 1
This example extracts and prints the salary of all employees whose last name begins with any letter
between A and P, inclusive:
Figure 271 ON VSAM Statement – Example 1
LIBRARY : CTBP.PROD.RULES RULE : VSAM
COMMAND === SCROLL=== CRSR
+-----------------------------------------------------------------------------+
OWNER M42 GROUP PRO
UPDATED 08/08/00 - 14:22:41 BY M42B
DESC
OPTIONS
===========================================================================
EXECUTE SALARY UPON C
ON VSAM FILENAME ACC.PROJ1.SALARY T KSDS
FIRSTKEY = C'A' C
LASTKEY = C'P' C
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 001 - 020 STOP AND/OR
STRING = .AL.
DO EXTRACT = EMPNAME
LEVEL LINE +000 COL 0001 - 0020 PROCESS TYP
DO EXTRACT = EMPSALARY
LEVEL LINE +000 COL 0021 - 0032 PROCESS TYP
DO PRINT = SALARY = '%%EMPNAME %%EMPSALARY' F C
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
PLEASE FILL IN RULE DEFINITION. 14.33.21
482
Control-M/Analyzer User Guide
Example 2
This example extracts and prints the salary of employees listed in the 2nd through 9th records of an
RRDS type VSAM file.
Figure 272 ON VSAM Statement – Example 2
LIBRARY : CTBP.PROD.RULES RULE : RULRRDS
COMMAND ===> SCROLL===> CRSR
+------------------------------------------+
OWNER M42 GROUP PROD
UPDATED 08/08/00 - 12:34:12 BY M42
DESC
OPTIONS
===========================================================================
EXECUTE SALARY UPON C
ON VSAM FILENAME ACCT.VSAM.RRDS T RRDS
FIRSTKEY = C'2' C
LASTKEY = C'9' C
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 001 - 001 STOP AND/OR
STRING = .AL.
DO EXTRACT = EMPNAME
LEVEL 0 LINE +000 COL 0001 - 0020 PROCESS TYP
DO EXTRACT = SALARY
LEVEL 0 LINE +000 COL 0071 - 0080 PROCESS TYP
DO PRINT = %%EMPNAME F C
DO PRINT = %%SALARY F C
DO
WHEN LINE - COL - STOP AND/OR
PLEASE FILL IN RULE DEFINITION. 11.50.15
Example 3
This example extracts and prints the salary of employees listed in the 2nd through 12th records of an
ESDS type VSAM file with 80-character records.
Figure 273 ON VSAM Statement – Example 3
LIBRARY : CTBP.PROD.RULES RULE : RULESDS
COMMAND ===> SCROLL===> CRSR
+-------------------------------------+
OWNER M42 GROUP PROD
UPDATED 08/08/00 - 12:33:12 BY M42
DESC
OPTIONS
===========================================================================
EXECUTE SALARY UPON C
ON VSAM FILENAME PROD.VSAM.ESDS T ESDS
FIRSTKEY = C'080' C
LASTKEY = C'880' C
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 001 - 001 STOP AND/OR
STRING = .AL.
DO EXTRACT = EMPNAME
LEVEL 0 LINE +000 COL 0001 - 0020 PROCESS TYP
DO EXTRACT = SALARY
LEVEL 0 LINE +000 COL 0071 - 0080 PROCESS TYP
DO PRINT = %%EMPNAME F C
DO PRINT = %%SALARY F C
DO
WHEN LINE - COL - STOP AND/OR
PLEASE FILL IN RULE DEFINITION. 12.20.18
483
Control-M/Analyzer User Guide
484
Control-M/Analyzer User Guide
General Information
OWNER is used by the internal security mechanism of Control-M/Analyzer to determine those operations
that each user is authorized to perform.
The OWNER parameter is also used to enable more convenient handling of missions and rules. When
using the Online Tracking and Control facility, you can limit the display of Control-M/Analyzer information
to specified owners.
OWNER is used in interactions with external security products, such as TOP SECRET, RACF, and ACF2.
The value of the OWNER parameter is based on the method of Control-M/Analyzer invocation:
Direct invocation by a job step or program
The OWNER is specified on the Rule Definition screen by the creator of the rule.
Invocation by mission
The OWNER receives its value from the mission definition.
Invocation by other INCONTROL products
When the rule is called by the DO CTBRULE statement in Control-M, Control-D, or Control-V, OWNER
receives its value from the Control-M job scheduling definition, or the Control-D or Control-V
decollating mission.
485
Control-M/Analyzer User Guide
Example
Figure 276 OWNER Statement Example
LIBRARY : CTB.PROD.RULES RULE : CHECKCUR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M55 GROUP CURRENCY
UPDATED 08/08/00 - 09:18:35 BY M55A
DESC CHECK BALANCING OF BANK'S FOREIGN CURRENCY INVESTM
OPTIONS
===========================================================================
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME REPORT JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 020 - 030 COL 001 - 132 STOP AND/OR
STRING = NOT BALANCED
DO SHOUT TO OPER URGENCY R
= FOREIGN CURRENCY REPORT NOT BALANCED !!!
DO TERMINAT = NOTOK COD 1001
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
486
Control-M/Analyzer User Guide
Format
This parameter is set by Control-M/Analyzer and cannot be changed. For display only.
General Information
The date and time are reset each time the rule is modified.
Example
Figure 277 UPDATE ... BY Parameter Example
LIBRARY : CTB.PROD.RULES RULE : CHECKCUR
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M55 GROUP CURRENCY
UPDATED 08/08/00 - 09:18:35 BY M55A
DESC CHECK BALANCING OF BANK'S FOREIGN CURRENCY INVESTM
OPTIONS
===========================================================================
EXECUTE CHECK UPON C
ON SYSOUT PROCST PGMST DDNAME REPORT JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 020 - 030 COL 001 - 132 STOP AND/OR
STRING = NOT BALANCED
DO SHOUT TO OPER URGENCY R
= FOREIGN CURRENCY REPORT NOT BALANCED !!!
DO TERMINAT = NOTOK COD 1001
===========================================================================
EXECUTE UPON C
ON
====== >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
487
Control-M/Analyzer User Guide
Parameter Description
UNTIL LINE A 3-digit number from 001 through 999, greater than or equal to
FROM LINE. Mandatory.
UNTIL COL A 3-digit number from 001 to 999, greater than or equal to FROM
COL plus the length of the specified string minus 1. Mandatory.
Note: The line and column positions can also be specified using relative values (for
example, the first line of the current page, plus an offset value). For more information, see
Search Areas (LINE and COL Parameters) (on page 495).
When search strings are joined by a Boolean operator (for example, .AND. or .OR.), the
values specified in the COL parameter are ignored and data is extracted from the first
column in the specified line range.
488
Control-M/Analyzer User Guide
Parameter Description
489
Control-M/Analyzer User Guide
Parameter Description
490
Control-M/Analyzer User Guide
Parameter Description
STRING string is the string used for comparison. The string can contain
leading blanks and can be surrounded by quotes.
(continued)
The comparison is performed character by character, left to right.
Note: For comparison operators, the length of the string must not
exceed the length between the FROM COLUMN and UNTIL COLUMN
parameters, inclusive.
STOP criteria LINE and COL ranges to be searched and the STOP string to search
for. Formats are identical to the parameters above. Optional.
General Information
Parameters that immediately follow statement WHEN in the Rule Definition screen provide additional
criteria for identifying data. The search is performed on the data source type specified by statement ON.
When Control-M/Analyzer finds data that match the STRING specification, the current position is set to
the position of the first character of the located string in the data source.
Details of the search process are provided below. See "Single vs. Multiple Occurrences of a String" in
Search Areas (LINE and COL Parameters) (on page 495) for an explanation of how system variable
SYSSRCHALL affects the search process.
WHEN Blocks
Each WHEN and its parameters (including STOP criteria) form a WHEN statement. Single WHEN
statements can be linked together by the AND and/or OR parameters (note, for future use) to form a
compound WHEN statement. (See "Compound WHEN Statements" below.)
WHEN statements and subsequent DO statements form a WHEN block. Each EXECUTE block that does
not contain an ON DATA statement must contain at least one WHEN block.
491
Control-M/Analyzer User Guide
If the WHEN statement criteria are satisfied, the DO statements in that WHEN block are performed. If the
string specified in a WHEN statement occurs more than once in the searchable column range of a line,
system variable SYSSRCHALL determines whether the DO statements are performed only once or as
many times as the search string occurs. See Summary of System Variables (on page 262) for a
description of this system variable.
492
Control-M/Analyzer User Guide
If the ON statement MODE parameter is set to PG (page mode) and the search area for the string
specified by the next WHEN statement is defined with absolute line numbers, Control-M/Analyzer will
search for that string on the current page and on each subsequent page of the dataset.
Note: If there are two or more compound WHEN statements, after the first has been found, the
search continues for the next WHEN, and so on. The process is repeated for each page.
The search continues in this manner. Subsequent WHEN statements are evaluated only after the
requirements of higher WHEN statements in the block have been met.
If all the criteria of all specified statements of the current WHEN block are met, the DO statements of
that WHEN block are performed.
After performing the DO statements, Control-M/Analyzer continues to search for the string specified in
the last (lowest) WHEN statement. Each time the string is found, the DO statements are performed
again.
Note: If only one WHEN statement exists in the block, it is considered the last. Therefore, it is
searched for repeatedly. Each time its criteria are met, the DO statements are performed. If the
EXECUTE block consists of several WHEN blocks, the WHEN blocks are executed in parallel and
independently of each other. This enables the simultaneous search for unrelated criteria in the same
data.
Example 1
A large company is divided into several departments. Each department contains many employees. A
report exists that is grouped by department. Within each department, employees and corresponding
salary information are listed in alphabetical order.
Figure 280 Data for WHEN Structure – Example 1
COMPUTER ENTERPRISES, INC. 05/05/00 PAGE: 1
The salary information for an employee named Jones in the accounting department is desired. A
compound WHEN statement is specified:
493
Control-M/Analyzer User Guide
1 ACCOUNTING BRANCH:
2 JONES
STOP Criteria
After DO statements of a WHEN block are performed, the search continues for the last (lowest) WHEN
statement.
STOP criteria provide a means to restart searches from higher level WHEN statements (of the current
WHEN block).
If the criteria of a WHEN statement are met, Control-M/Analyzer searches for the STOP criteria specified
in that WHEN statement. This search begins on the next line after the line containing the WHEN
statement criteria.
If the STOP criteria are not met, processing continues as described in "Compound WHEN Statements"
above.
If the STOP criteria are met, Control-M/Analyzer stops searching for strings specified by lower WHEN
statements and resumes searching for the string specified in the WHEN statement whose STOP criteria
were met. This search begins with the line containing the STOP criteria.
Example 2
A large restaurant chain has several branches. Each branch employs several individuals. A report exists
that is grouped by branch. Each branch name is preceded by the string BRANCH:. Within each branch,
employees and their salary information are listed. Each employee name is preceded by the string
EMPLOYEE:.
Figure 281 Data for WHEN Structure – Example 2
FAST-FOOD, INC. 05/05/00 PAGE:51
==============================================================================
BRANCH: MIAMI BEACH
------------------------------------------------------------------------------
EMPLOYEE: GRANT, THOMAS 04/09/96 40,000
EMPLOYEE: JAMES, KAREN 02/01/97 45,000
EMPLOYEE: JONES, BARRY 03/08/94 36,000
EMPLOYEE: ROBERTSON, JANE 03/10/99 20,000
BRANCH: PHILADELPHIA
------------------------------------------------------------------------------
EMPLOYEE: MCPHEARSON, BRIAN 10/10/98 25,000
EMPLOYEE: PETERS, KEITH 04/04/97 50,000
Salary information for all employees of the New York City branch is desired. STOP criteria are specified
within a compound WHEN statement:
494
Control-M/Analyzer User Guide
2 EMPLOYEE:
495
Control-M/Analyzer User Guide
Value Description
Absolute Values Explicit line numbers (based on the start of the dataset or the start
of the current page, depending on the MODE), and explicit column
numbers.
Example
WHEN LINE 003-020 COL 050-070
The ON statement MODE parameter specifies whether Absolute
Values are based on the start of the dataset or the start of the
page. Line and column number prefixes can be specified to
override the default set by MODE. (See "Relative Values" and
"WHEN Relative Values" below.)
See Compound WHEN Statements (on page 492) for information
about how the search process is performed when the MODE
parameter is set to PG and absolute line numbers are specified in
the LINE parameter.
Relative Values Relative line numbers can be specified with the following prefixes:
PG+n – n lines after the beginning of the current page.
PG-n – n lines before the beginning of the current page.
DS+n – n lines after the beginning of the current dataset.
Examples
WHEN LINE PG+003 - PG+020 COL 050 - 070
WHEN LINE DS+003 - DS+020 COL 050 - 070
496
Control-M/Analyzer User Guide
Value Description
WHEN Relative Values Line and column numbers can be relative to the location where a
search string, specified by a higher level WHEN statement, was
found. The higher level WHEN, whose criteria were met, must be
within the same WHEN block as the specified relative LINE and
COL values.
Because several WHEN statements may exist within the same
WHEN block, the desired WHEN statement level must be identified.
Each WHEN is numbered in ascending order (indicated by m in the
format below), beginning with the number one. (Level zero cannot
be specified in statement WHEN.)
The appropriate WHEN statement can be referenced by specifying
the hierarchical level using the following prefixes:
Lm+n – n lines after the position located by the WHEN of level
m.
Lm-n – n lines before the position located by the WHEN of
level m.
Cm+n – n columns after (to the right of) the position located
by the WHEN of level m.
Cm-n – n columns before (to the left of) the position located
by the WHEN of level m.
These prefixes cannot be used to refer to WHEN statements of
other WHEN blocks. However, these prefixes can be used in the
STOP criteria for the same WHEN block.
Examples
WHEN LINE L01+003 - L01+020 COL 050 - 070
WHEN LINE 003 - 020 COL C01+050 - C01+070
Note: When working in MODE=DS (dataset), line number "999" denotes the end of the report (for
example, LINE 001-999 means all lines of the report).
It is possible to reference a string a few pages prior to the current page by using negative numbers. The
number of pages retained (kept) for this purpose is set in the RTEBUF installation parameter. For
additional information, see the discussion about installing Control-M/Analyzer in the INCONTROL for z/OS
Installation Guide.
The search for STOP criteria always begins on the line after the line where the corresponding WHEN
criteria were found, even if the STOP LINE parameter specifies a prior line.
STRING Operators
A string must be specified when no operator is used and immediately after each .GT., .LT., .GE., .LE.,
.NE., and .WI. operator.
The string for operator .WI. is a mask containing one or more ? symbols. Each ? represents a single "wild
character" that may be a number, letter or symbol. For example, ??/??/?? can be used as the mask for a
date in this format.
497
Control-M/Analyzer User Guide
Operator .AL. instructs Control-M/Analyzer to perform subsequent DO statements for every line in the
LINE/COL range (as if every line matched the WHEN criteria, without regard to the string). No string is
searched for or compared. Therefore, no string is specified. However, the position found in the line is
automatically set to the FROM column value (the first value in the COL range). For subsequent DO
EXTRACT statements, the position within the line found as a result of using operator .AL. is 1.
Operators .SR. and .ER. instruct Control-M/Analyzer to perform subsequent DO statements once at the
start or end of the report (as if the first or last line of the report matched the WHEN criteria, without
regard to the string). No string is searched for or compared; therefore, no string is specified.
Operators .SP. and .EP. instruct Control-M/Analyzer to perform subsequent DO statements at the start or
end of each page (as if the start or end of each page matched the WHEN criteria, without regard to the
string). No string is searched for or compared. Therefore, no string is specified.
AutoEdit Substitution
Control-M/Analyzer AutoEdit and Local variables can be embedded in WHEN and STOP criteria. The
variables are resolved (replaced) at time of rule execution. For additional information on AutoEdit
processing see Control-M/Analyzer Variables (on page 222).
Single vs. Multiple Occurrences of a String
System variable SYSSRCHALL determines whether a line will be searched for all occurrences or for only
the first occurrence of the string specified in a WHEN statement. When SYSSRCHALL=0 (the default
value), only the first occurrence on a line is found. When SYSSRCHALL=1, the search continues until
every occurrence on the line has been found and the DO statements are performed each time an
occurrence is found. See Summary of System Variables (on page 262) for a description of this system
variable.
Example 3
The report printed below illustrates the uses of statement WHEN. For each salesperson, the report lists
invoiced sales and year-to-date totals for sales, commissions paid, commissions owed, and the
commission payroll amount.
The report is formatted as follows:
Year-to-date commissions paid for each salesperson are located between columns 68 and 78, and are
preceded by the phrase YTD COMMISSIONS PAID.
For each salesperson, the figure (in the same column range) directly below the year-to-date
commissions paid represents the year-to-date commissions owed.
For each salesperson, the figure (in the same column range) two lines below the year-to-date
commissions paid represents the commission payroll amount.
Note: A column numbering line has been provided at the top and bottom of the sample report for your
convenience. This line is not an actual report line.
498
Control-M/Analyzer User Guide
Year-to-date commissions paid, year-to-date commissions owed, and commission payroll amount for each
salesperson are extracted from this report. These numbers are compared to determine if the data in the
report are balanced.
The string YTD COMMISSIONS PAID is found once for each salesperson in the report. Each time the string
is found, the DO EXTRACT statement extracts the three commission figures. For each salesperson, the
sum of the year-to-date commissions paid and the commission payroll amount should equal the
year-to-date commissions owed. This formula indicates whether the figures are balanced.
Figure 283 WHEN Structure – Example 3
LIBRARY : CTB.PROD.RULES RULE : ARWARN02
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
EXECUTE INPUT UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0000 DATASTAMP
WHEN LINE 001 - 060 COL 001 - 025 STOP AND/OR
STRING = YTD COMMISSIONS PAID
DO EXTRACT = YTDPAID
LEVEL 0 LINE +000 COL 0068 - 0078 PROCESS TYP
DO EXTRACT = YTDOWED
LEVEL 0 LINE +001 COL 0068 - 0078 PROCESS TYP
DO EXTRACT = CURRENT
LEVEL 0 LINE +002 COL 0068 - 0078 PROCESS TYP
DO BLOCK = CHECK ARG C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE ENDJOB UPON C
ON DATA
IF ERRORCOUNT>0 C
DO PRINT = %%BLANK F C
PLEASE FILL IN RULE DEFINITION. 14.58.28
499
Control-M/Analyzer User Guide
Example 4
A sysout of a report is provided below to illustrate the uses of statement WHEN. The report shows a
sample banking statement with fields for check number, account number, bank number, transaction date,
and transaction amount.
Every debit line begins with D.
Every credit line begins with C.
Note: Column numbering lines have been provided at the top and the bottom of the sample report for
your convenience. These lines are not actual report lines.
Figure 284 Data for WHEN Structure – Example 4
----+----1----+----2----+----3----+----4----+----5----
D 0001042 4489/54 663 05/04/00 + 5000.00
C 0001231 6297/53 660 09/10/00 + 250.00
D 0000411 3242/32 659 07/08/00 + 10500.50
C 0000012 4487/34 659 05/06/00 + 670.24
C 0001333 8834/18 663 12/10/00 + 1000.45
C 0001031 3233/10 663 12/12/00 + 1000450.75
C 0001173 3233/32 659 05/10/00 - 150.00
D 0001122 4353/01 663 05/10/00 + 904.99
C 0000099 1252/10 659 06/04/00 - 100.80
D 0001050 3341/33 663 05/01/00 - 350.55
D 0001283 9893/34 663 26/05/00 - 50.00
D 0001001 1234/56 660 18/05/00 + 3000.00
D 0001023 3422/39 663 10/08/00 + 250.25
C 0000835 4200/10 663 05/05/00 - 250.25
D 0001560 2229/09 660 08/12/00 + 2000000.00
----+----1----+----2----+----3----+----4----+----5----
Each line that starts with C is located and all the credits are added to Database variable DB_CREDIT. Each
line that starts with D is located and all the debits are added to Database variable DB_DEBIT. Summation
is performed during the extraction because the TYP parameter is set to SU.
Figure 285 WHEN Structure – Example 4
LIBRARY : CTB.PROD.RULES RULE : BANKSTAT
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP BANKING
UPDATED 08/08/00 - 15:17:14 BY M43A
DESC TOTAL CREDITS AND DEBITS OF BANK STATEMENT
OPTIONS
===========================================================================
EXECUTE GETOWED UPON C
ON SYSOUT PROCST PGMST STEP12 DDNAME ACCREP JOBNM
MODE DS LINECT 0000 DATASTAMP
WHEN LINE 001 - 999 COL 002 - 002 STOP AND/OR
STRING = C
DO EXTRACT = DB_CREDIT
LEVEL LINE +000 COL 0004 - 0010 PROCESS TYP SU
DO
WHEN LINE 001 - 999 COL 002 - 002 STOP AND/OR
STRING = D
DO EXTRACT = DB_DEBIT
LEVEL LINE +000 COL 0004 - 0010 PROCESS TYP SU
DO
WHEN LINE - COL - STOP AND/OR
STRING =
PLEASE FILL IN RULE DEFINITION. 15.21.56
The report on the following page illustrates additional uses of statement WHEN. The report shows the
status of accounts receivable for a company. It is formatted as follows:
500
Control-M/Analyzer User Guide
Every account starts on a new page. An account may span several pages. In this case, the word
CONTINUED appears in the STATUS column at the bottom of each page (except the last) for that
account.
If an account has an outstanding balance, the balance is printed after the words TOTAL DUE:. If the
account has no outstanding balance, the words PAID IN FULL are displayed instead.
The page number is printed at the top of each page, prefixed by the word PAGE. There is a maximum
of 60 lines on each page.
Each line of the report starts in column two. (The first column is reserved for ASA-code control
character symbols.)
Note: Column numbering lines have been provided at the top and the bottom of the sample report for
your convenience. These lines are not actual report lines.
501
Control-M/Analyzer User Guide
502
Control-M/Analyzer User Guide
Example 5
The financial status of client General Comp. Systems (GCS) is determined.
Two WHEN statements, logically connected by the AND parameter, are specified. These two WHEN
statements form one compound WHEN statement.
The first WHEN statement (level 1) initiates a search for the name of the company (string ‘GENERAL
COMP. SYSTEMS (GCS)’) on line four of each report page.
The second WHEN statement (level 2) locates the totals line of the report for this company (string
‘TOTALS’) that appears on the current page or subsequent page of the report.
When both strings are located, the DO statements in this WHEN block are processed. In this example, the
DO statements are executed only once. Control-M/Analyzer does not continue searching for string
TOTALS because the last DO statement specified is DO TERMINAT.
Figure 287 WHEN Structure – Example 5
LIBRARY : CTB.PROD.RULES RULE : GCSSTAT
COMMAND ===> SCROLL===> CRSR
+-------------------------------------------------------------------------------+
======= >>>>>>>>>>>>>>> TOP OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =======
OWNER M18B GROUP ACCOUNTS
UPDATED 09/09/99 - 15:30:05 BY M18B
DESC REPORT THE STATUS OF GENERAL COMP. SYSTEMS
OPTIONS
=============================================================================
EXECUTE REPGCS UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 004 - 004 COL 002 - 050 STOP AND/OR A
STRING = ACCOUNT GENERAL COMP. SYSTEMS (GCS)
WHEN LINE 006 - 060 COL 002 - 010 STOP AND/OR
STRING = TOTALS
DO EXTRACT = NAME
LEVEL 1 LINE +000 COL +008 - +034 PROCESS TYP
DO EXTRACT = STATUS
LEVEL 2 LINE +000 COL +092 - +116 PROCESS TYP
DO PRINT = STATUS OF COMPANY %%NAME F C
DO PRINT = IS %%STATUS F C
DO TERMINAT = OK COD 0000
PLEASE FILL IN RULE DEFINITION. 12.23.19
503
Control-M/Analyzer User Guide
Example 6
Building on the previous example, a summary report (that provides a list of company names and their
financial status) is created.
Two WHEN statements, that are similar to the WHENs of the previous example, are specified. In this
example, the search for a new client should resume each time a new page is reached (because each
client starts on a new page). STOP criteria are added to the highest WHEN. These STOP criteria search
for operator .SP. (start of page) that identifies a new page.
As a result of this definition, Control-M/Analyzer searches for the string ACCOUNT again on every new
page. Control-M/Analyzer finds the name of the current client, and locates the string TOTALS until the
end of the report is reached.
Figure 288 WHEN Structure – Example 6
LIBRARY : CTB.PROD.RULES RULE : SUMREP
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
OWNER M18B GROUP ACCOUNTS
UPDATED 09/09/99 - 15:30:05 BY M18B
DESC SUMMARIZE THE ORIGINAL REPORT
OPTIONS
============================================================================
EXECUTE REPORT UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 004 - 004 COL 002 - 015 STOP Y AND/OR A
STRING = ACCOUNT
STOP LINE 001 - 006 COL 002 - 010
STRING = .SP.
WHEN LINE 006 - 060 COL 002 - 015 STOP AND/OR
STRING = TOTALS
DO EXTRACT = NAME
LEVEL 1 LINE +000 COL +008 - +034 PROCESS TYP
DO EXTRACT = STATUS
LEVEL 2 LINE +000 COL +092 - +116 PROCESS TYP
DO PRINT = %%NAME-%%STATUS F C
DO
PLEASE FILL IN RULE DEFINITION. 14.43.36
504
Control-M/Analyzer User Guide
Example 7
The average invoice amount for each company is calculated by specifying three WHEN statements,
connected by AND parameters. The first two WHEN statements specify STOP criteria. These three WHEN
statements form one WHEN block.
The first WHEN statement determines starting and ending lines for each company. The average of
each company is retrieved from the lines located between the company name and TOTALS.
The second WHEN statement determines which lines (of the lines located by the first WHEN) contain
a total that should be extracted. In the report, these lines are located between two lines of dashes
(these lines contain a numeric value in column AMOUNT).
The third WHEN statement locates the actual invoice amounts. Control-M/Analyzer retrieves amounts
from exactly one line after the first line of dashes. Processing finishes when the second line of dashes is
reached.
Figure 289 WHEN Structure – Example 7
LIBRARY : CTB.PROD.RULES RULE : AVERAGES
COMMAND ===> SCROLL===> CRSR
+------------------------------------------------------------------------------+
EXECUTE CALCAVG UPON C
ON SYSOUT PROCST PGMST STEP01 DDNAME SYSUT2 JOBNM
MODE PG LINECT 0060 DATASTAMP
WHEN LINE 005 - 005 COL 002 - 011 STOP Y AND/OR A
STRING = ACCOUNT
STOP LINE 006 - 060 COL 002 - 015
STRING = TOTALS
WHEN LINE 006 - 060 COL 001 - 020 STOP Y AND/OR A
STRING = ————
STOP LINE 007 - 060 COL 001 - 020
STRING = ————
WHEN LINE L02+001 - 060 COL 070 - 081 STOP AND/OR
STRING = .AL.
DO EXTRACT = FULLNAME
LEVEL 1 LINE +000 COL +008 - +034 PROCESS TYP
DO EXTRACT = SHRTNAME
LEVEL 1 LINE +000 COL +031 - +033 PROCESS TYP
DO BLOCK = CHKNAME ARG SHRTNAME,FULLNAME
DO EXTRACT = AVG%%SHRTNAME C
LEVEL 0 LINE +000 COL +000 - +011 PROCESS TYP AV
PLEASE FILL IN RULE DEFINITION. 14.09.00
Example 8
The input for this example is a bank customer report. The account balance (variable AMOUNT) is
extracted from "detail lines" that contain a ‘C’ (for Credit) or ‘D’ (for Debit) in column 2. The extracted
quantities are summed by record type (C or D). The detail lines can be identified and the account balance
can be extracted and summed with one WHEN statement.
The DO EXTRACT statements illustrated below first extract the record type (C or D), and then sum the
AMOUNT by record type. This is done by dynamically incorporating the record type (C or D) as part of the
variable name (AMOUNT%%TYPE).
505
Control-M/Analyzer User Guide
Example 9
The input for this example is an employee report. The employee number, salary and vacation days are
extracted from detail lines that contain any digit in column 9. (Column 9 contains the first digit of the
employee number.)
The required operations can be accomplished with one WHEN statement. The WHEN statement searches
for any character that is less than or equal to 9 and greater than or equal to zero.
Figure 291 WHEN Structure – Example 9
LIBRARY : CTB.ALL.RULES RULE : WHEN01
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M55 GROUP INTRAC
UPDATED 08/08/00 - 17:45:92 BY M55
DESC COMPOUND WHEN CRITERIA
OPTIONS
===========================================================================
EXECUTE INPUT UPON C
ON SYSOUT PROCST PGMST DDNAME BANKREP JOBNM
MODE PG LINECT DATASTAMP
WHEN LINE 001 - 060 COL 009 - 009 STOP AND/OR
STRING = .LT.9 .AND. .GT.0
DO EXTRACT = EMP_NUM
LEVEL 0 LINE +000 COL 0009 - 0019 PROCESS TYP
DO EXTRACT = SALARY
LEVEL LINE +000 COL 0060 - 0070 PROCESS TYP
DO EXTRACT = VACATION
LEVEL LINE +000 COL 0050 - 0055 PROCESS TYP
DO BLOCK = CHECK ARG C
DO
WHEN LINE - COL - STOP AND/OR
STRING =
PLEASE FILL IN RULE DEFINITION. 17.47.18
506
Control-M/Analyzer User Guide
507
Control-M/Analyzer User Guide
Syntax Checking
The following methods exist for checking the syntax of rule definitions:
Through the Online facility
Rule definitions viewed using the Online facility are automatically checked for syntax errors. Syntax
error messages are displayed in a special error message screen. Additional changes cannot be made
to a rule with a syntax error until the error is corrected.
Through the Control-M/Analyzer Runtime Environment
When the Control-M/Analyzer Runtime Environment is invoked, rule definitions are automatically
checked for syntax errors. Results are displayed in the SYSPRINT job output.
Through utility CTBCMP
Utility CTBCMP checks the syntax of the specified rule definition. For additional information about this
utility, see the INCONTROL for z/OS Utilities Guide.
Quick Compile program module CTBCQC
The rule definition can be checked for syntax errors while viewing the rule definition in a standard editor.
Specify !CTBCQC in the command field and press Enter. Results are inserted as note lines at the top of
the rule definition, as illustrated below:
Figure 292 Results of Quick Compile Program Module CTBCQC
EDIT ---- CTB.PROD.RULES(ARWARN02) - 01.00 ------------------- COLUMNS 001 072
COMMAND ==> SCROLL ===> CRSR
=NOTE= CONTROL-M/ANALYZER VERSION 6.0.00 RULE COMPILER
=NOTE=
=NOTE= CTB109I- COMPILATION STARTED
=NOTE= CTB110I- COMPILATION COMPLETED SUCCESSFULLY
=NOTE= CTB111I- HIGHEST ERROR CODE WAS 0
000001
000002 HEADER GROUP 'INTRAC' OWNER 'M66' DATE '090999' TIME '153005' CREATOR 'M
000003 66' DESC 'SUMMARIZE AND CHECK PAYROLL TOTALS'
000004
000005 EXECUTE 'INIT'
000006 ON_DATA
000007 ALWAYS
000008 DO SET 'ERRORCOUNT' EVAL '0'
000009 DO SET 'SLSNO' EVAL '0'
000010 DO SET 'BLANK' EVAL ''' '''
000011 DO PRINT DATA '******** PAYROLL CONTROL TOTALS ********'
000012
508
Control-M/Analyzer User Guide
EXECUTE blocks
A series of EXECUTE blocks, each specifying the data source that needs to be balanced, balancing
criteria, and resulting actions. Each EXECUTE block:
• Begins with command EXECUTE.
• Specifies a data source using command ON_.
• May identify data ranges to process using command WHEN.
• Performs actions specified by command DO.
EXECUTE blocks containing an ON DATA command are used to perform balancing actions on
Control-M/Analyzer variables. An IF-THEN-ELSE structure is used.
A sample rule definition structure is provided below:
Figure 293 Sample Rule Definition Structure
HEADER information
509
Control-M/Analyzer User Guide
Language Syntax
Commands, function names and System variable names are reserved words. These words should not
be specified as rule, mission, or variable names. For a complete list of reserved words, see B
Reserved Words (on page 673).
A command line is processed from column 1 through 72. Columns 73-80 are ignored.
A command may be continued from line to line if the end of a line is reached. If the end of a line is
reached in the middle of a specification in quotes (such as a data string specification), the
specification must continue in the first column of the next line.
When typing the rule definition, BMC recommends that the text be indented to clearly indicate nesting
levels.
Comments may be specified in the member by placing text between the symbols /* and */.
Comments are not processed during rule execution.
Expressions may be specified to set the values of CONTROL variables. For syntax, see Expressions
and Functions (on page 269) and Database Variable Reference Method (on page 230).
Expression Delimiters
When creating rule definitions with the Online facility, quotes are automatically and appropriately placed
within the definition. When creating rule definitions with an editor, BMC recommends the manual insertion
of quotation marks.
Control-M/Analyzer recognizes two types of quotes:
Table 274 Control-M/Analyzer Expression Delimiters
Quote Description
Variables and expressions whose operands are numeric do not need to be delimited by apostrophes:
IF SUM > 250 is equivalent to IF 'SUM > 250'
IF DB_TOTAL=TOTAL is equivalent to IF 'DB_TOTAL=TOTAL'
IF TOTAL=1000 is equivalent to IF 'TOTAL=1000'
Data strings must always be delimited:
DO PRINT 'DATA ARE BALANCED'
DO REMARK 'DATA ARE BALANCED'
If a data string exists within an expression, both the expression and the data string must be delimited.
The expression is delimited with apostrophes, and the data string is delimited with two consecutive
apostrophes (quotation marks).
510
Control-M/Analyzer User Guide
Note: DATA and FORM – in the examples above – are reserved words. For a complete list of reserved
words, see B Reserved Words (on page 673).
AND is both an operator and a reserved word (as a parameter of statement WHEN). When specified as an
operator, AND must be placed between apostrophes along with the rest of the expression.
Valid:
IF 'DB_TOTAL < 1000 AND DB_TOTAL > 500'
Invalid:
IF 'DB_TOTAL < 1000' AND 'DB_TOTAL > 500'
Command Reference
The syntax and a brief description of each Control-M/Analyzer command is provided below. Each
command corresponds to an online Rule Definition parameter. The commands are grouped in the same
manner as the Online parameters: Basic Rule commands; Data Selection commands (ON_ commands);
Data Identification commands (WHEN, IF, ALWAYS); and DO commands (that are presented in
alphabetical order).
For additional information about a command, refer to the corresponding parameter or statement earlier in
this chapter.
Items enclosed in square brackets ([ ]) are optional. These items can be specified or omitted.
511
Control-M/Analyzer User Guide
512
Control-M/Analyzer User Guide
513
Control-M/Analyzer User Guide
514
Control-M/Analyzer User Guide
515
Control-M/Analyzer User Guide
516
Control-M/Analyzer User Guide
517
Control-M/Analyzer User Guide
518
Control-M/Analyzer User Guide
519
Control-M/Analyzer User Guide
520
Control-M/Analyzer User Guide
Example 1
The sample sysout provided below lists account information for a banking institution.
Header information is listed in lines 1 through 5. Account information is listed in lines 6 through 60.
Each account number has a ‘/’ in column 8. This slash is used by the rule definition to determine if the
current line of the sysout contains information about a specific account. The deposit amount of each
account is specified in positions 92 through 103.
This rule definition calculates the sum of the deposit amount for all of the accounts. If the sum is greater
than 1,000,000, balancing criteria have not been met, a remark is specified, prerequisite condition
NOTOK-%%JOBNAME is added, and the rule is terminated with a NOTOK result.
Figure 294 Rule Definition Process Sample Report – Example 1
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9---
FOREIGN CURRENCY DEPOSITS AS OF: 05/05/99
ACCOUNT DEPT NAME CURR DEPOSIT-PERIOD INTEREST INTEREST DEPOSIT MATURITY
NUMBER NO. ENCY TO FROM RATE AMOUNT AMOUNT DATE
000100/34 507 MURPHY CHRISTOPHER US 04/26/99 03/26/99 6.3570 9.15 7654321.99 05/26/99
000102/34 505 BRADY GREG US 04/26/99 03/25/99 7.3520 338.78 55296.50 06/25/99
000107/34 509 LOHEN ROBERT US 04/27/99 03/24/99 7.2910 40.04 6590.50 05/24/99
000110/34 507 KLINGNER KATHLEEN US 04/27/99 03/26/99 8.1130 13.39 1980.20 05/27/99
000112/34 420 SCHNEIDER ROBERT US 04/22/99 03/22/99 6.9220 45.13 7823.50 04/21/99
000118/34 310 BARNES THOMAS US 04/20/99 03/19/99 7.1430 93.86 15768.30 06/20/99
000121/34 512 BROWN ELIZABETH US 04/27/99 03/26/99 7.3520 10.44 1703.50 05/27/99
000125/34 505 KOTCH DIANA US 04/26/99 03/26/99 7.2910 102.01 16789.40 05/26/99
000129/34 512 KIRSTY JEFF US 04/27/99 03/25/99 7.3520 87.59 14296.50 05/27/99
000134/34 401 LIGMAN LEONARD US 04/27/99 03/25/99 7.1430 54.09 9087.70 06/27/99
000138/34 401 JENNY MICHAEL US 04/26/99 03/26/99 7.2910 53.44 8795.70 06/26/99
000140/34 310 BLAU CAROL US 04/26/99 03/25/99 6.9220 30.38 5267.50 04/25/99
000142/34 509 MARKS ANDREW US 04/22/99 03/22/99 6.5240 48.58 8935.50 04/21/99
521
Control-M/Analyzer User Guide
Example 2
The sample file provided below lists inventory information for an assembly shop.
Header information is listed in lines 1 through 5. Item information is listed in rows 12 through 59.
Each item is assigned to a department. Each department has a name and a number associated with
it. The data in the file is organized so that item information is sorted by department.
Items are also associated with group numbers. The group number of each item is specified as part of
the item number, in positions 6 through 10. Each group number begins with a ‘-’.
The purpose of the rule definition is to determine if items must be ordered for department 100 – Final
Assembly Shop – group -781. This is determined by adding the total amount currently in stock for
department 100, group -781, and comparing this number to the minimum on-hand amount (that is stored
in the Control-M/Analyzer Database). If items must be ordered, TSO user M18B is notified by the Shout
facility, a remark is issued, and the rule is terminated with a NOTOK result.
522
Control-M/Analyzer User Guide
DATE: 08.08.00
UPDATE: 08.08.00
INVENTORY REPORT
----------------
523
Control-M/Analyzer User Guide
/*
* SET DATABASE VARIABLE WITH COMPUTED QTY.
* CHECK IF QTY IS UNDER MINIMUM (USING DATA-BASE), AND
* ACT ACCORDINGLY.
*/
EXECUTE 'BAL'
ON_DATA
ALWAYS
DO PRINT
DATA 'TOTAL QUANTITY FOR FINAL ASSEMBLY SHOP GRP 781 IS %%QTY'
DO SET 'DB_INVENTORY.QTY_781' EVAL 'QTY'
Example 3
The sample file provided below lists personnel information.
Employee information can be located in lines 5 through 60.
A period follows the first initial of each employee. This period is used as an indicator to determine if
employee information exists on the current line.
This rule definition determines if employees have exceeded their maximum number of sick or vacation
days. This sample rule definition first initializes variables and prints out the header of a report. Then, the
name, number of sick days, and the number of vacation days are extracted and validated (by calling
another block within the same rule definition). The extracted information is printed, including an analysis
of the balancing result.
524
Control-M/Analyzer User Guide
/*
* EXAMINE THE FILE 'CTB.PROD.EMPREP'
* (THE FILE CONTAINS THE REPORT LISTED ABOVE.)
*/
EXECUTE 'INPUT'
ON_FILE 'CTB.PROD.EMPREP'
/*
* PROCESS EACH LINE THAT HAS '.' IN POSITION 13
*/
WHEN FLINE +1 TLINE +60 FCOL +13 TCOL +14 SEARCH '.'
/*
* EXTRACT THE NAME, NUMBER OF VACATION DAYS, AND
* NUMBER OF SICK-DAYS.
*/
DO EXTRACT 'NAME' LEVEL +0 LINE 0 COL -2
DO EXTRACT 'SICK' LEVEL +0 LINE 0 COL 87
DO EXTRACT 'VAC' LEVEL +0 LINE 0 COL 93
/*
* CALL ANOTHER BLOCK TO CHECK THE VALIDITY OF THE DATA.
*/
DO BLOCK 'CHECK' PARAMS 'NAME,SICK,VAC'
/*
* PRINT END OF REPORT, CHECK RESULTS AND FINISH.
*/
EXECUTE 'FIN'
ON_DATA
ALWAYS
DO PRINT DATA '+--+---------------+------+-----+'
DO PRINT DATA 'CHECKED %%COUNTER USERS, FOUND %%UNREASON
UNREASONABLE DAYS'
DO REMARK DATA 'CHECKED %%COUNTER USERS, FOUND %%UNREASON
UNREASONABLE DAYS'
IF 'UNREASON > 5'
DO TERMINATE RESULT NOTOK CODE 2000
525
Control-M/Analyzer User Guide
/*
* SPECIAL BLOCK TO CHECK DATA (CALLED PREVIOUSLY)
*/
EXECUTE 'CHECK'
ON_DATA
ALWAYS
DO SET 'COUNTER' EVAL 'COUNTER+1'
IF 'BARG02 > 90 | BARG03 > 30'
DO PRINT DATA '| |%%BARG01| %%BARG02 | %%BARG03 |'
DO SET 'UNREASON' EVAL 'UNREASON+1'
526
6
6
Mission Definition Parameters
This chapter includes the following topics:
Mission Definition Parameters (on page 528)
• General Mission Parameters (on page 529)
• Basic Scheduling Parameters (on page 530)
• Runtime Scheduling Parameters (on page 533)
• Rule Execution Parameters (on page 533)
Parameter Descriptions (on page 534)
CATEGORY: Mission Definition Parameter (on page 535)
CONFCAL: Mission Definition Parameter (on page 537)
DATES: Mission Definition Parameter (on page 540)
DAYS: Mission Definition Parameter (on page 542)
DESC: Mission Definition Parameter (on page 550)
DOCLIB: Mission Definition Parameter (on page 552)
DOCMEM: Mission Definition Parameter (on page 554)
GROUP: Mission Definition Parameter (on page 556)
IN: Mission Definition Parameter (on page 558)
JOB: Mission Definition Parameter (on page 561)
MAXWAIT: Mission Definition Parameter (on page 563)
MINIMUM: Mission Definition Parameter (on page 566)
MISSION: Mission Definition Parameter (on page 568)
MONTHS: Mission Definition Parameter (on page 570)
NOT LATER THAN: Mission Definition Parameter (on page 571)
OWNER: Mission Definition Parameter (on page 573)
PDS: Mission Definition Parameter (on page 575)
PRIORITY: Mission Definition Parameter (on page 577)
RETRO: Mission Definition Parameter (on page 578)
RULELIB: Mission Definition Parameter (on page 581)
RULENAME: Mission Definition Parameter (on page 582)
SCOPE: Mission Definition Parameter (on page 583)
527
Control-M/Analyzer User Guide
528
Control-M/Analyzer User Guide
General Mission parameters specify basic mission information such as the mission name and the
mission category.
Basic Scheduling parameters specify dates to schedule a mission.
Runtime Scheduling parameters specify runtime conditions required to activate a mission.
Rule Execution parameters specify runtime settings for initialization of System variables (that control
rule processing) and for creation and initialization of Local variables required by the rule.
Different scheduling parameters can be specified for each category of a mission. For more information,
see CATEGORY: Mission Definition Parameter (on page 535).
This chapter first summarizes the parameters in each of the four groups listed above, and then describes
each parameter, in alphabetical order. Each parameter description includes the parameter name in capital
letters, a brief explanation of the purpose of the parameter, a description of the required format, an
extract or sample of the Control-M/Analyzer screen to illustrate where and how the parameter fields are
entered, and practical examples to further illustrate implementing the parameter.
Parameter Description
JOB Name of the job upon that the mission will act.
SCOPE Extent to which a mission can be executed (for example, only once,
several times by a single job step, several times by the same job, or
many times by different jobs).
529
Control-M/Analyzer User Guide
Parameter Description
Parameter Description
DATES Specific dates in the year to activate the balancing mission – day
and month.
530
Control-M/Analyzer User Guide
Parameter Description
MINIMUM Minimum number of free tracks required for the library defined in
parameter PDS under that the balancing mission is ordered.
Description
Basic Scheduling parameters determine on which day a mission is scheduled in (ordered to) the Active
Environment.
Basic Scheduling parameters are divided into the four groups listed below. Parameters must be selected
from only one of the first three groups. Use of the fourth group (D) is optional.
Table 278 Basic Scheduling Parameter Groups
Group Parameters
A DAYS
WDAYS
MONTHS
CONFCAL
B DATES
C PDS
MINIMUM
D RETRO
MAXWAIT
The various Basic Scheduling parameters and subparameters provide different methods of specifying a
missions schedule. Each mission definition may use any one or several of these parameters, depending on
scheduling requirements.
Each Basic Scheduling parameter is described in detail in the following pages. However, the
interrelationships between some of these parameters are described briefly below.
531
Control-M/Analyzer User Guide
DAYS/DCAL WDAYS/WCAL
These parameters are all optional.
The DAYS parameter identifies days of the month on that the mission should be scheduled (for
example, 1st day of the month, 3rd working day of the month). Several formats are available for
specifying DAYS values.
The WDAYS parameter identifies days of the week on that the mission should be scheduled. For
example, the 1st day of the week, the 2nd working day of each week, and so on. Several formats are
available for specifying WDAYS values.
A calendar specifies days of the year on which a rule can be scheduled, known as working days. For more
information on calendars and the IOA Calendar Facility, see IOA Calendar Facility (on page 204).
When the DAYS and DCAL parameters are both specified, they work as a complementary unit, as
described later in this chapter.
Similarly, when the WDAYS and WCAL parameters are both specified, they work as a complementary unit,
as described later in this chapter.
When values for the DAYS (/DCAL) and WDAYS (/WCAL) parameter are both specified in the same
balancing mission, the resulting schedule is determined by the value specified in field AND/OR.
CONFCAL/SHIFT
A calendar specified in CONFCAL is not used for mission scheduling, but is used instead for validating a
scheduled date. Only missions that have satisfied all other specified basic scheduling criteria are checked
against the CONFCAL calendar. If the day is a working day in the CONFCAL calendar, the mission is
scheduled on that day. Otherwise, the mission is either shifted to (scheduled on) another day according to
the value specified in the SHIFT parameter, or the mission is not scheduled (if no SHIFT value has been
specified).
CONFCAL calendars are useful for handling holidays and other scheduling exceptions.
532
Control-M/Analyzer User Guide
5. The IOA Scheduling facility decides whether to schedule a mission based on the algorithm outlined
above.
Parameter Description
NOT LATER THAN Specification of a time at that the mission is activated regardless of
the existence of prerequisite conditions.
Parameter Description
533
Control-M/Analyzer User Guide
Parameter Descriptions
The following pages contain detailed descriptions of all Mission Definition parameters available in the
Mission 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 Control-M/Analyzer screen
general information explaining the parameter and its usage
where applicable, some practical examples illustrating implementation of the parameter
For more information on the Mission Definition facility, see Online Facilities (on page 58).
534
Control-M/Analyzer User Guide
Mandatory. CATEGORY specifies a category name of 1 through 20 characters. No blanks (except trailing
blanks) can be specified.
General Information
Scheduling parameters for each mission can be specified under different categories. It is possible to use
different scheduling criteria for different calendar cycles (for example, daily, monthly, yearly). Each set of
balancing criteria is called a category.
Any number of categories (for example, any number of scheduling criteria) can be defined. BMC
recommends that only one category (for example, DAILY) be used for all missions in early stages of
Control-M/Analyzer implementation.
535
Control-M/Analyzer User Guide
Example
Figure 302 CATEGORY Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY--------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
536
Control-M/Analyzer User Guide
Subparameter Description
537
Control-M/Analyzer User Guide
Subparameter Description
Note: Specifying a SHIFT value does not ensure that the job will be
scheduled. SHIFT cannot add scheduling dates; it can only shift a
job to a scheduling date that is already defined. If SHIFT does not
find a suitable date in the other scheduling criteria, the job is not
scheduled.
General Information
CONFCAL calendars are especially useful for handling holidays and other scheduling exceptions.
If not specified, missions are scheduled according to other scheduling criteria without confirmation.
CONFCAL should not contain the name of a periodic calendar. If it does, no day will pass the confirmation.
SHIFT cannot be specified unless CONFCAL is specified. When CONFCAL is specified, SHIFT is optional
(for example, blank defaults to no shifting).
The CONFCAL parameter cannot be used with the PDS and MINIMUM parameters.
Example
This example is based on the following assumptions:
The current month is September 2001.
Working days are defined in calendar WORKDAYS that contains the following working days (indicated
by Y) for September 2001:
--S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 +
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Start of the week is defined as Monday. Weeks start on the following dates in September: 3rd, 10th, 17th,
24th.
538
Control-M/Analyzer User Guide
Schedule the rule on the 1st, 7th and 15th day of the month if they are both Saturdays and working days
in WORKDAYS. If the day of the month (1st, 7th, 15th) is not a Saturday, do not schedule the rule. If the
day of the month is a Saturday but is not a working day, schedule the rule on the next working day.
DAYS - 1,7,15
AND/OR - AND
WDAYS - 6
CONFCAL - WORKDAYS
SHIFT - >
539
Control-M/Analyzer User Guide
Optional. Valid values are 4-character dates in mmdd or ddmm format, depending on the site standard.
A maximum of 12 dates can be specified.
General Information
The mission is scheduled for execution only on the dates specified in parameter DATES.
The DATES parameter cannot be used with the PDS, MINIMUM, MONTHS, DAYS, and DCAL parameters.
To specify more than 12 dates for one mission, define the dates in a calendar (instead of using this
parameter) and specify the calendar in DCAL (or WCAL).
Example
Schedule a mission for the 21st of June and the 21st of December (mmdd format):
540
Control-M/Analyzer User Guide
541
Control-M/Analyzer User Guide
Optional. The DAYS parameter specifies days of the month on that missions should be scheduled,
provided other basic scheduling criteria are met. Values for DAYS can be specified alone, or they can be
specified in conjunction with a calendar specified in the DCAL parameter. DAYS and DCAL can also be
specified in conjunction with WDAYS and WCAL (described in WDAYS: Mission Definition Parameter (on
page 592)).
DAYS subparameters are described in Table 282.
Table 282 DAYS Subparameters
Subparameter Description
542
Control-M/Analyzer User Guide
Subparameter Description
A (AND) Both DAYS (and DCAL) and WDAYS (and WCAL) criteria must be
satisfied to schedule a mission.
O (OR) Either DAYS (and DCAL) or WDAYS (and WCAL) criteria must be
satisfied to schedule a mission. Default.
If A (AND) is specified when either DAYS or WDAYS is specified (but
not both), the missing DAYS or WDAYS value is automatically set to
ALL.
543
Control-M/Analyzer User Guide
Format Description
ALL All days of the month. If ALL is specified, other DAYS values cannot be
specified with it.
+n,... Days of the month in addition to the working days specified in the DCAL
calendar. DCAL is mandatory.
–n,... Schedule the mission on all days except the nth day from the beginning
of the month. DCAL is mandatory.
>n,... Schedule the mission on the indicated day if it is a working day in the
DCAL calendar. Otherwise, schedule the mission on the next working
day that is not negated by a –n value in this parameter. This format is
frequently used for holiday handling. DCAL is mandatory.
<n,... Schedule the mission on the indicated day if it is a working day in the
DCAL calendar. Otherwise, schedule the mission on the last previous
working day that is not negated by a –n value in this parameter. This
format is frequently used for holiday handling. DCAL is mandatory.
Dn,... Schedule the mission on the nth working day from the beginning of the
month. DCAL is mandatory.
–Dn,... Schedule the mission on all working days except the nth working day
from the beginning of the month. DCAL is mandatory.
Ln,... Schedule the mission on the nth day (or nth working day if DCAL is
defined) counting backward from the end of the month. DCAL is
optional.
–Ln,... If DCAL is defined, schedule the mission on all working days except the
nth working day counting backward from the end of the month. If DCAL
is not defined, schedule the mission on all days except the nth day from
the end of the month. DCAL is optional.
544
Control-M/Analyzer User Guide
General Information
Negative values take precedence over positive values when determining whether a mission is scheduled
on a certain date. If a negative value (for example, format –n, –Dn, –Ln, –DnPi, or –LnPi) in either the
DAYS or WDAYS field prevents a mission from being scheduled on a date, the mission will not be
scheduled on that date even if a positive value (for example, Ln) would otherwise result in the mission
being scheduled on that date.
A maximum of eight values (for example, of types DnPi, –DnPi, LnPi, and –LnPi) can be designated in any
desired order.
If periodic and non-periodic values are mixed when specifying the DAYS parameter, processing will
depend on the calendar type specified in the DCAL parameter.
If a non-periodic calendar is specified in the DCAL parameter, only non-periodic values in the DAYS
parameter are processed; periodic values are ignored. In this case, negative periodic values (for
example, –DnPi, –LnPi) are also ignored and do not supersede other values.
If a periodic calendar is specified in the DCAL parameter, all periodic values and the negative
non-periodic value -n in the DAYS parameter are processed; all other non-periodic values are ignored.
–D*Pi, –D*P*, –L*Pi and –L*P* are not permitted, because these values would result in ordering the
mission on no days in a period, or no days in all periods, a meaningless request.
The MONTHS parameter is ignored when periodic values are specified in the DAYS or WDAYS parameters.
The DAYS parameter cannot be used with the PDS, MINIMUM, and DATES parameters.
545
Control-M/Analyzer User Guide
Examples
The examples in this chapter are based on the following assumptions:
The current month is December 2001.
Working days are defined in the WORKDAYS calendar that contains the following working days
(indicated by Y) for December 2001:
--S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
The PERIDAYS periodic calendar contains the following periodic definition for December 2001. These
examples assume that all other days of this calendar are blank.
--S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
B C A A B B C A A B B C A A B B C A A B B
Start of the week is defined as Monday. Weeks start on the following dates in December 2001: 3rd,
10th, 17th, 24th, and 31st.
At the end of each example, asterisks in a December 2001 calendar indicate the days on which the
mission is scheduled.
Example 1
Schedule the mission on the 17th day and the last day of the month.
DAYS 17,L01
Example 2
Schedule the mission on all working days of the month except the 6th day of the month, and also
schedule the mission on the 1st day of the month.
DAYS +1,-6
DCAL WORKDAYS
546
Control-M/Analyzer User Guide
Example 3
Schedule the mission on all working days of the month except the first and last working days, and except
the 17th day, of the month.
DAYS -D1,-17,-L1
DCAL WORKDAYS
Example 4
Schedule the mission on the 8th day of the month. If it is not a working day, schedule the mission on the
closest preceding working day.
DAYS <8
DCAL WORKDAYS
Example 5
Schedule the mission on the 1st day of period A, and on all days, except the 2nd day, of period B. Do not
schedule the mission on the 5th day of the month.
DAYS -5,D1PA,-D2PB
DCAL PERIDAYS
Example 6
Schedule the mission on each Monday and on the 1st day of the month.
DAYS 1
AND/OR OR
WDAYS 1
547
Control-M/Analyzer User Guide
Example 7
Schedule the mission on the 3rd day of the month provided it is a Monday.
DAYS 3
AND/OR AND
WDAYS 1
Example 8
Schedule the mission on the last Monday of the month:
DAYS L1,L2,L3,L4,L5,L6,L7
AND/OR AND
WDAYS 1
Example 9
Schedule the mission on the 1st, 7th and 15th days of the month if they are both Saturdays and working
days. If the day of the month (1st, 7th, 15th) is not a Saturday, do not schedule the mission. If the day of
the month is a Saturday, but it is not a working day, schedule the mission on the next working day.
DAYS 1,7,15
AND/OR AND
WDAYS 6
CONFCAL WORKDAYS
SHIFT >
548
Control-M/Analyzer User Guide
Example 10
Schedule the mission to run on the first Friday after the 15th of the month.
DAYS 16,17,18,19,20,21,22
AND/OR AND
WDAYS 5
549
Control-M/Analyzer User Guide
Optional. The DESC parameter specifies a description text of 1 through 50 characters. One description line
may be specified.
General Information
The DESC parameter is informational. It does not affect rule processing. The description is intended to let
the user know the purpose of (or some other key information about) the mission.
The mission description can be specified in any language. It is used as an internal help facility, assisting
the user in controlling the missions under Control-M/Analyzer.
To specify complete mission documentation, see Mission Documentation (on page 138).
550
Control-M/Analyzer User Guide
Example
Figure 319 DESC Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
551
Control-M/Analyzer User Guide
General Information
The library can be any standard partitioned data set. The record length must be 80.
Any number of documentation libraries can be used at a site. However, only one documentation library
can be specified in each mission definition.
Note: Users with DOCU/TEXT installed at their sites may specify a DOCU/TEXT library and member.
However, only files with an 80 character record length can be used and only the first 71 characters are
displayed.
552
Control-M/Analyzer User Guide
Example
Mission documentation is written to the INV member in the PROD.CTB.DOC library.
Figure 321 DOCLIB Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION NVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
553
Control-M/Analyzer User Guide
Optional. The DOCMEM parameter specifies a valid member name of 1 through 8 characters.
General Information
This member is used to save detailed documentation written in the DOC lines of the Mission Definition
screen.
Note: Users with DOCU/TEXT installed at their sites may specify a DOCU/TEXT library and member.
However, only files with an 80 character record length can be used and only the first 71 characters are
displayed.
554
Control-M/Analyzer User Guide
Example
Mission documentation is written to the INV member in the PROD.CTB.DOC library.
Figure 323 DOCMEM Parameter Example
--- CONTROL-M/ANALZYER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
555
Control-M/Analyzer User Guide
Optional. The GROUP parameter specifies a group name of 1 through 20 characters. Only trailing blanks
are allowed.
General Information
The GROUP parameter facilitates the handling of balancing missions. It enables the retrieval of
information on the balancing missions of a specific group, usually by the Online Tracking and Control
facility, or by the Reporting facility.
Groups can be defined using the Database Variable Online facility.
The group name appears in all important messages relating to the balancing missions of the group.
Jobs, missions, and variables may be grouped for simulation so that complete systems can be tested as a
unit.
During rule execution, the group name specification is checked for existence in the Control-M/Analyzer
Database Variable file. Several invocation methods exist that determine the group name under that a rule
executes:
direct invocation by a job step or program
The group specified by the job step or program is used. If no group is specified by the job step or
program, the GROUP specification in the rule definition is used.
invocation by mission
GROUP receives its value from the mission definition. In this case, the group name specified by the
mission definition overrides the group name specified by the rule definition.
556
Control-M/Analyzer User Guide
Example
Figure 325 GROUP Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
557
Control-M/Analyzer User Guide
Subparamete
r Description
558
Control-M/Analyzer User Guide
Subparamete
r Description
General Information
The mission is activated only if all the prerequisite conditions (specified in the IN parameter) are satisfied.
A prerequisite condition can represent any user-specified situation. The following are a few examples of
prerequisite conditions:
IMS-ACTIVE
WEEKEND
JOB-EJGH12-FINISHED
SALARY-OK
BRANCH_TRANSMISSION
Mission execution dependencies can be defined and implemented by using prerequisite conditions created
by a DO COND statement. Prerequisite conditions can trigger (or stop) the activation of missions in
Control-M/Analyzer and Control-D, and can also trigger or stop a job or process in Control-M.
Each prerequisite condition is associated with a specific scheduling date. This scheduling date
differentiates between different activations of the same mission for different scheduling dates.
The PREV date reference automatically resolves to a scheduling date reference for the missions previous
scheduling date.
The **** or $$$$ date reference can be any prerequisite condition with the same name as that specified
in parameter IN, with any date reference that will satisfy the IN requirement.
The ODAT of an IN condition is only calculated once – when the mission is first ordered. This date is then
retained until the mission is reordered.
Examples
Example 1
Activate the balancing mission that produces the inventory report when the rule finished OK. When the
rule that produces the inventory report finishes OK, it creates the prerequisite condition INVENTORY-OK.
The inventory report is balanced twice a month, for the 1st and for the 15th. The report for the 15th is
balanced only if the prerequisite condition INVENTORY-OK for that report exists (signifying the job
creating the inventory report ended OK). The existence of the prerequisite condition INVENTORY-OK does
not cause balancing of the report on the 15th.
The job on the 1st does not necessarily run on the 1st of the month. For example, if the inventory job
only finishes executing on the 3rd. Only then is the prerequisite condition INVENTORY-OK of the 1st
created. This is because the prerequisite condition is always associated with a scheduling date and not
with the actual run date.
559
Control-M/Analyzer User Guide
Example 2
In this example a report should be balanced only after the totals of the report have been checked for
reasonableness. The IN parameter can specify a prerequisite condition such as REPORT12-CHECKED, that
is created by the rule that made the check.
Figure 328 IN Parameter – Example 2
---- CONTROL-M/ANALZYER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS 2,3,4,5,6 DCAL
AND/OR
WDAYS WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO Y MAXWAIT 00
MINIMUM PDS
===========================================================================
IN REPORT12-CHECKED ODAT
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
560
Control-M/Analyzer User Guide
Mandatory. JOB specifies a valid job name of 1 through 8 characters. Mask characters can be specified in
the JOB name.
General Information
When Control-M/Analyzer is invoked, the Active Balancing file is scanned for corresponding mission
entries, those entries whose mission name matches parameter MISSION. Corresponding mission entries
are then checked further to determine that mission to execute. For example, the job name specified in the
mission entry should match the JOB parameter. For additional information on the Active Balancing file
search method see Invoking the Control-M/Analyzer Runtime Environment (on page 41).
Job Mask
The JOB field can contain an asterisk (*) as the last character. Any job name with the specified prefix will
match.
561
Control-M/Analyzer User Guide
Example
Figure 330 JOB Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
562
Control-M/Analyzer User Guide
Optional. The MAXWAIT parameter must be a number in the range from 00 through 98 (days) or 99 (no
limit). The default is 00. A leading zero is required.
Table 285 MAXWAIT Values
Value Description
MAXWAIT=00 The mission is not executed if it did not execute on the original
schedule date.
MAXWAIT=99 The mission waits for execution indefinitely (for example, remains in
the Active Balancing file even if it finishes executing.)
General Information
The MAXWAIT parameter is used to overcome production delay problems. A mission that is scheduled for
execution on a specific day does not always finish executing that same day. This is the case when the job
that is to be balanced has not yet run. A mission may be delayed due to a number of reasons, such as
hardware failure, a heavy production workload, or a bug in one of the predecessors of the mission.
Therefore, it may be desirable to specify an additional number of days that the mission should remain
available for execution.
When a mission is scheduled due to the parameter RETRO=Y, the mission is always given at least one
day to execute. This occurs even if the current working date exceeds the MAXWAIT days after the last
original scheduling date of the mission.
563
Control-M/Analyzer User Guide
Examples
Example 1
The balancing mission should wait for execution indefinitely until the runtime conditions required for the
mission are available:
MAXWAIT=99
Example 2
The balancing mission should be given an extra three days to execute after its original scheduling date
has passed:
DAYS=2,4,6
MAXWAIT=3
Assume that the balancing mission will not run due to the absence of the required runtime conditions. The
balancing mission that is scheduled for the 2nd of the month will wait from the 2nd through the 5th to be
executed.
On the 6th, Control-M/Analyzer times out and the balancing mission scheduled for the 2nd will not be
executed. The balancing missions scheduled for the 4th and 6th will wait for execution until the 7th and
9th.
Figure 332 MAXWAIT Parameter – Example 2
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS 2,4,6 WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO Y MAXWAIT 03
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
564
Control-M/Analyzer User Guide
Example 3
Schedule the balancing mission for every working day, whether the computer is active. Give the balancing
mission one extra day to execute:
DCAL=WORKDAYS,
RETRO=Y,
MAXWAIT=1
Assume that the WORKDAYS calendar, specified in the DCAL parameter, contains the values 15, 16, 18,
and 19. The computer was offline from the 16th up to and including the 18th, and the 15th was the last
date that the mission was scheduled for execution.
Today is the 19th. The balancing mission is scheduled three times with the original scheduling dates of
the 16th, 18th, and 19th.
The balancing missions on the 16th and the 18th are disregarded on the 20th if they have not yet
executed. The balancing mission on the 19th is disregarded only on the 21st.
Figure 333 MAXWAIT Parameter – Example 3
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL WORKDAYS
AND/OR
WDAYS WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO Y MAXWAIT 01
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
565
Control-M/Analyzer User Guide
The MINIMUM and PDS parameters are optional, but if one is specified, the other is mandatory.
The MINIMUM parameter specifies the required number of free tracks. This must be a positive 3-digit
number.
The MINIMUM parameter cannot be used with the DAYS, WDAYS, MONTHS, CONFCAL, RETRO, and
DATES parameters.
General Information
The number of unused tracks in the library described by the PDS parameter is counted. If this number is
less than the number specified in the MINIMUM parameter, the mission is scheduled for execution.
Note: The MINIMUM parameter only checks current extents.
566
Control-M/Analyzer User Guide
Example
Schedule the mission when there are less than 20 unused tracks in the ALL.PARMLIB library.
Figure 335 MINIMUM Parameter
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL WORKDAYS
AND/OR
WDAYS WCAL
MONTHS 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12-
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM 020 PDS ALL.PARMLIB
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 12.34.10
567
Control-M/Analyzer User Guide
Mandatory. MISSION displays the mission name. The mission name is specified in the Mission Definition
entry panel or is selected from the Mission list.
General Information
The mission name forms the link between the balancing rule and the balancing mission. The mission
determines which rule should execute and at what time the execution will occur, based on the scheduling
and runtime criteria specified in the Mission Definition screen.
When Control-M/Analyzer is invoked, the Active Balancing file is searched for corresponding mission
entries, those entries whose mission name matches the MISSION parameter. Corresponding mission
entries are then checked further to determine which mission to execute. For additional information on the
Active Balancing file search method see Invoking the Control-M/Analyzer Runtime Environment (on page
41).
568
Control-M/Analyzer User Guide
Example
Figure 337 MISSION Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
569
Control-M/Analyzer User Guide
General Information
The mission is ordered only during the months specified with Y in the MONTHS parameter.
The MONTHS parameter cannot be used with the PDS, MINIMUM, and DATES parameters.
When the MONTHS parameter is used, at least one of the following must be specified: DAYS, DCAL,
WDAYS, or WCAL.
The MONTHS parameter is ignored when periodic values are specified in the DAYS or WDAYS parameter.
Examples
Order a balancing mission only in March and September:
MONTHS 1- N 2- N 3- Y 4- N 5- N 6- N 7- N 8- N 9- Y 10- N 11- N 12- N
570
Control-M/Analyzer User Guide
Optional. The NOT LATER THAN parameter must be in the format hhmm (where hh is the hour and mm is
the minute).
Example
2101 = 09:01 p.m.
0301 = 03:01 a.m.
General Information
This parameter triggers execution of the mission at the specified time even if prerequisite conditions
specified in the IN parameter do not exist. Use this parameter in those cases where the prerequisite
condition is desirable but not absolutely necessary for execution of the mission.
When the NOT LATER THAN parameter is not specified, the mission executes only if the prerequisite
conditions and the other scheduling requirements are satisfied.
571
Control-M/Analyzer User Guide
Example
Execute the balancing mission at 3:00 a.m. even if the prerequisite conditions do not exist.
Figure 340 NOT LATER THAN Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN REPORT12-CHECKED ODAT
TIME FROM TO NOT LATER THAN 0300 PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
572
Control-M/Analyzer User Guide
General Information
The OWNER parameter is used by the Control-M/Analyzer internal security mechanism to determine those
operations that each user is authorized to perform.
The OWNER parameter is also used to enable more convenient handling of missions and rules. When
using the Online Scheduling, Tracking and Control facility, you can limit the display of Control-M/Analyzer
information to specified owners.
The OWNER parameter is used in interactions with external security products, such as TOP SECRET, RACF
and ACF2.
The default OWNER is dependent on the online environment of the site (CICS, TSO, and so on).
573
Control-M/Analyzer User Guide
Example
Figure 342 OWNER Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
574
Control-M/Analyzer User Guide
The PDS and MINIMUM parameters are optional, but if one is specified, the other is mandatory.
PDS specifies a data set name of 1 through 44 characters.
General Information
The data set must be cataloged and it must be a partitioned data set.
The PDS cannot be used with the DAYS, WDAYS, MONTHS, CONFCAL, RETRO, and DATES parameters.
The PDS parameter is usually used to schedule a mission that will compress the library.
System libraries (such as SYS1.LINKLIB) should not be compressed using the standard compression
procedure. Therefore, BMC recommends that the WRN option of the TASKTYPE parameter be used.
Note: PDS does not work with PDSE-type libraries because they will always appear to be 100% full.
575
Control-M/Analyzer User Guide
Example
Check the ALL.PARMLIB library for a minimum of 20 unused tracks.
Figure 344 PDS Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS WCAL
MONTHS 1- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12-
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM 020 PDS ALL.PARMLIB
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
576
Control-M/Analyzer User Guide
577
Control-M/Analyzer User Guide
General Information
The RETRO parameter is used to control situations where the computer has not been working for a day or
more due to holiday or hardware failure, and so on.
When such situations occur, it is necessary to instruct Control-M/Analyzer whether the mission should be
retroactively scheduled for the days when the computer (or Control-M/Analyzer) was inactive.
When RETRO=Y, missions are placed on the Active Balancing file for all the days the mission should have
been originally scheduled. Scheduling occurs from the last scheduling date to the current working date,
provided that those days were included in one of the scheduling parameters DAYS, DCAL, and so on. Each
mission placed on the Active Balancing file is associated with a different original scheduling date.
When RETRO=N, the mission is only scheduled for the current working date, provided that the mission is
normally scheduled for that date.
The RETRO parameter cannot be used with the MINIMUM and PDS parameters.
578
Control-M/Analyzer User Guide
Examples
Example 1
Schedule the balancing mission only on specific dates in the month. If the date has passed, do not
schedule the mission.
Figure 347 RETRO Parameter – Example 1
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS 15,16,18,19,20 DCAL
AND/OR
WDAYS WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
Assume that the computer was off line from the 16th until the 18th, and the 15th was the last date that
the mission was scheduled for execution. Today is the 19th. Therefore, the mission is only scheduled for
execution on the 19th.
579
Control-M/Analyzer User Guide
Example 2
Schedule the balancing mission for every working day, whether the computer is active or not.
Figure 348 RETRO Parameter – Example 2
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL WORKDAYS
AND/OR
WDAYS WCAL
MONTHS 1- N 2- N 3- N 4- N 5- N 6- N 7- N 8- N 9- N 10- N 11- N 12- N
DATES
CONFCAL SHIFT RETRO Y MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
Assume that the computer was off line from the 16th until the 18th, and the 15th was the last date that
the mission was scheduled for execution. Today is the 19th.
Assume that the WORKDAYS calendar contains the dates 15, 16, 18, and 19. Therefore, the mission is
scheduled three times with the original scheduling dates: the 16th, 18th, and 19th.
580
Control-M/Analyzer User Guide
Mandatory. RULELIB must specify a valid data set name of 1 through 44 characters. No blanks (except
trailing blanks) are allowed.
General Information
The library may be any standard partitioned data set. The record length must be 80.
The library does not have to exist when the parameters are defined. Rule existence is checked by
Control-M/Analyzer during execution of the balancing mission.
Example
Figure 350 RULELIB Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-----(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
581
Control-M/Analyzer User Guide
Mandatory. RULENAME specifies a rule name of 1 through 8 characters. No blanks (except trailing blanks)
are allowed.
General Information
Every balancing mission is associated with a rule that performs the actual balancing tasks. The associated rule is
specified in the RULENAME parameter.
The rule definition contains specific balancing information, such as the type of data to be balanced and balancing
criteria. For more information about rule definition parameters, see Rule Definition (on page 348).
Example
Figure 352 RULENAME Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-----(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
582
Control-M/Analyzer User Guide
General Information
When Control-M/Analyzer is invoked, the Active Balancing file is scanned for corresponding mission
entries, those entries with mission names that match the MISSION parameter. Corresponding mission
entries are then checked further to determine which mission to execute. The SCOPE parameter helps
determine which entries match the specified JOB and STEP specifications.
Valid SCOPE values are shown in Table 286.
583
Control-M/Analyzer User Guide
Value Description
SINGLE If JOB and STEP values match, the mission entry is eligible for
further checking only if it has not been executed before. SINGLE
guarantees that this mission entry is only executed once – by a
single Control-M/Analyzer invocation.
STEP If JOB and STEP values match, the mission entry is eligible for
further checking if it has not been executed before, or it was
previously executed by the current STEP in the current JOB. STEP
enables the mission entry to be executed by several
Control-M/Analyzer invocations, provided that the invocations all
originated from the same job step (for example, from an application
program that invokes Control-M/Analyzer from within a loop).
JOB If JOB and STEP values match, the mission entry is eligible for
further checking if it has not been executed before, or it was
previously executed by the current JOB. JOB enables the mission
entry to be executed by several Control-M/Analyzer invocations,
provided that the invocations all originated from the same job.
ALL If JOB and STEP values match, the mission entry is eligible for
further checking. ALL enables the mission entry to be executed by
any or all Control-M/Analyzer invocations regardless of the jobs and
steps that previously initiated the entry.
For additional information on the Active Balancing file search method, see Invoking the
Control-M/Analyzer Runtime Environment (on page 41).
584
Control-M/Analyzer User Guide
Example
Figure 354 SCOPE Parameter Example
---- CONTROL-M/ANALZYER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
585
Control-M/Analyzer User Guide
586
Control-M/Analyzer User Guide
Optional, unless the SCOPE parameter is set to the value STEP. Maximum length: 8 characters. Mask
characters may be specified in the STEP name.
General Information
When Control-M/Analyzer is invoked, the Active Balancing file is scanned for corresponding mission
entries, those entries with mission names that match the MISSION parameter. Corresponding mission
entries are then checked further to determine which mission to execute. The step name specified by the
invoking job step should match the STEP parameter. For additional information on the Active Balancing
file search method see Invoking the Control-M/Analyzer Runtime Environment (on page 41).
Job Step Prefixing
The STEP field can contain an asterisk (*) as the last character. Any step name with the specified prefix
will match.
587
Control-M/Analyzer User Guide
Example
Figure 357 STEP Parameter Example
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP STEP01 , STEP02 SCOPE STEP
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.12.25
588
Control-M/Analyzer User Guide
Optional. FROM and TO must be in hhmm format (where hh is the hour and mm is the minute).
Example
2101 = 09:01 p.m.
0301 = 03:01 a.m.
General Information
Control-M/Analyzer activates the mission only during the time range defined in the TIME parameter.
Mission entries with a TIME range that does not include the current time are not considered in the scan of
the Active Balancing file.
The mission is only executed from (but not before) the FROM time and up to (but not after) the TO time.
If either FROM or TO is not specified, the starting time of the Control-M/Analyzer working day is used as
the default.
If both FROM and TO are blank, no time limits are assumed.
589
Control-M/Analyzer User Guide
Examples
Example 1
Execute the balancing mission only between 9 p.m. and 6 a.m.
Figure 359 TIME Parameter – Example 1
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM 2100 TO 0600 NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
Example 2
Start executing the balancing mission no later than 0700 in the morning:
TIME=(,0700)
590
Control-M/Analyzer User Guide
Example 3
Start executing the balancing mission after midnight:
Figure 360 TIME Parameter – Example 3
---- CONTROL-M/ANALYZER CATEGORY DAILY BAL MISSION INVENTORY-------(BM.S)
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
CATEGORY DAILY MISSION INVENTORY
JOB INV STEP , SCOPE JOB
RULENAME INV01 RULELIB CTB.PROD.RULES
OWNER M43 GROUP INVENTORY
DESC END-OF-DAY INVENTORY CHECK
DOCMEM INV DOCLIB PROD.CTB.DOC
===========================================================================
DAYS DCAL
AND/OR
WDAYS ALL WCAL
MONTHS 1- Y 2- Y 3- Y 4- Y 5- Y 6- Y 7- Y 8- Y 9- Y 10- Y 11- Y 12- Y
DATES
CONFCAL SHIFT RETRO N MAXWAIT 00
MINIMUM PDS
===========================================================================
IN
TIME FROM 0000 TO NOT LATER THAN PRIORITY
===========================================================================
SET VARS
======= >>>>>>>>>> END OF BALANCING PARAMETERS FOR THIS CATEGORY <<<<<<< ======
USE THE DOC COMMAND TO SHOW/HIDE BALANCING DOCUMENTATION 10.01.10
591
Control-M/Analyzer User Guide
Optional. The WDAYS parameter specifies days of the week on which missions should be scheduled,
provided other basic scheduling criteria are met.
Values for WDAYS can be specified by themselves, or together with a calendar specified in the WCAL.
WDAYS or WCAL subparameter can also be specified in conjunction with DAYS and DCAL (described in
DAYS: Mission Definition Parameter (on page 542)).
WDAYS subparameters are described in Table 287.
Table 287 WDAYS Subparameters
Subparameter Description
592
Control-M/Analyzer User Guide
Subparameter Description
593
Control-M/Analyzer User Guide
Format Description
ALL All days in the week. If ALL is specified, other WDAYS values cannot
be specified with it.
If a WCAL calendar is not defined, schedule the rule on all days
in the week.
If a WCAL calendar is defined, schedule the rule only on the
working days indicated in the calendar.
+n,... Days of the week in addition to the working days specified in the
WCAL calendar. WCAL is mandatory.
–n,... Order the rule on all days except the nth day from the beginning of
the week. WCAL is mandatory.
>n,... Order the rule on the indicated day if it is a working day in the
WCAL calendar; otherwise, order the rule on the next working day
(within the next seven days) that is not negated by a –n value in
the parameter. If none of the next seven days is a working day, the
rule is not ordered. This format is frequently used for holiday
handling. WCAL is mandatory.
<n,... Order the rule on the indicated day if it is a working day in the
WCAL calendar; otherwise, order the rule on the last previous
working day (within the preceding seven days) that is not negated
by a –n value in the parameter. If none of the preceding seven days
was a working day, the rule is not ordered. This format is frequently
used for holiday handling. WCAL is mandatory.
Dn,... Order the rule on the nth working day from the beginning of the
week. WCAL is mandatory.
594
Control-M/Analyzer User Guide
–Dn,... Order the rule on all working days except the nth working day from
the beginning of the week. WCAL is mandatory.
Ln,... Order the rule on the nth working day from the end of the week.
WCAL is mandatory.
–Ln,... Order the rule on all working days except the nth working day from
the end of the week. WCAL is mandatory.
DnWm,... (Where m=1–6). If WCAL is defined, order the rule on the nth day
of the mth week of the month. If WCAL is not defined, order the
rule on the mth appearance of the nth day of the week during the
month. WCAL is optional.
Periodic scheduling
The following rules govern the use of periodic scheduling formats:
n is any integer from 0 through 6, and i is any valid period identifier (or * for all periods).
WDAYS period identifiers are counted on a week by week basis. Calculations do not cross week
boundaries (unlike DAYS periodic identifiers that do cross month boundaries).
The name of a periodic calendar must be specified in WCAL.
A maximum of eight periodic values can be designated in any desired order.
Table 289 Periodic Scheduling Formats
Format Description
DnPi,... Order the rule on the nth day of period i in each week, from the
beginning of the week.
–DnPi,... Order the rule on all days except the nth day of period i in each week,
from the beginning of the week.
LnPi,... Order the rule on the nth day of period i in each week, from the last day
of the week.
–LnPi,... Order the job on all days in period i except the nth day of period i in
each week, from the last day of the week.
595
Control-M/Analyzer User Guide
General Information
Negative values take precedence over positive values when determining whether a mission is scheduled
on a certain date. If a negative value (for example, format –n, –Dn, –Ln, –DnPi, or –LnPi) in either the
DAYS or WDAYS field prevents a mission from being scheduled on a date, the mission will not be
scheduled on that date even if a positive value (for example, Ln) would otherwise result in the mission
being scheduled on that date.
A maximum of eight periodic values (for example, of types DnPi, –DnPi, LnPi, and –LnPi) can be
designated in any desired order.
If periodic and non-periodic values are mixed when specifying parameter WDAYS, processing will depend
on the calendar type specified in parameter WCAL.
If a non-periodic calendar is specified in the WCAL parameter, only non-periodic values in the WDAYS
parameter are processed. Periodic values are ignored. In this case, negative periodic values (for
example, –DnPi, –LnPi) are also ignored and do not supersede other values.
If a periodic calendar is specified in the WCAL parameter, all periodic values and the negative
non-periodic value -n in the WDAYS parameter are processed; all nonnegative non-periodic values are
ignored.
The MONTHS parameter is ignored when periodic values are specified in the WDAYS or DAYS parameter.
The WDAYS parameter cannot be used with the PDS, MINIMUM, and DATES parameters.
When Ln and/or Dn values are specified in a week that overlaps two months, the MONTHS value of the
earlier month determines whether Dn or Ln values are applied in the week:
If the first day of the week falls in a month with a MONTHS value of Y, all Dn and Ln values in that
week are applied, even those falling in the next or previous month, when that month has a MONTHS
value of N.
If the first day of the week falls in a month with a MONTHS value of N, no Dn or Ln values in that
week are applied (not even if those falling in the next or previous month, when that month has a
MONTHS value of Y).
Examples
The examples in this chapter are based on the following assumptions:
The current month is December 2001.
Working days are defined in the WORKDAYS calendar that contains the following working days
(indicated by Y) for December 2001:
--S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
The PERIDAYS periodic calendar contains the following periodic definition for December 2001. These
examples assume that all other days of this calendar are blank.
--S-------------S-------------S-------------S-------------S--
1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1 2 3 4 5 6 7 8 9 + 1
B C A A B B C A A B B C A A B B C A A B B
596
Control-M/Analyzer User Guide
Start of the week is defined as Monday. Weeks start on the following dates in December 2001: 3rd,
10th, 17th, 24th, and 31st.
At the end of each example, asterisks in a December 2001 calendar indicate the days on which the
mission is scheduled.
Example 1
Schedule the mission on every Sunday and Monday.
WDAYS 0,1
Example 2
Schedule the mission on all working days and on all Saturdays.
WDAYS +6
WCAL WORKDAYS
Example 3
Schedule the mission every Sunday, if it is a working day. If Sunday is not a working day, schedule the
mission on the first preceding working day that is not a Friday.
WDAYS -5,<0
WCAL WORKDAYS
Example 4
Schedule the mission on the 1st Monday of the 1st week.
WDAYS D1W1
597
Control-M/Analyzer User Guide
Example 5
Schedule the mission on all working days except Mondays and Fridays.
WDAYS -D1,-L1
WCAL WORKDAYS
Example 6
Each week, schedule the mission on the 1st day of period A in each week, and on all days of period B,
except the second day of period B in each week.
WDAYS D1PA,-D2PB
WCAL PERIDAYS
Example 7
Schedule the mission on each Monday, and on the 1st day of the month.
DAYS 1
AND/OR OR
WDAYS 1
Example 8
Schedule the mission on the 3rd day of the month provided it is a Monday.
DAYS 3
AND/OR AND
WDAYS 1
598
Control-M/Analyzer User Guide
Example 9
Schedule the mission on the last Monday of the month:
DAYS L1,L2,L3,L4,L5,L6,L7
AND/OR AND
WDAYS 1
Example 10
Schedule the mission on the 1st, 7th and 15th day of the month if they are both Saturdays and working
days. If the day of the month (1st, 7th, 15th) is not a Saturday, do not schedule the mission. If the day of
the month is a Saturday, but it is not a working day, schedule the mission on the next working day.
DAYS 1,7,15
AND/OR AND
WDAYS 6
CONFCAL WORKDAYS
SHIFT >
599
7
7
Reconciliation Facility
This chapter includes the following topics:
Reconciliation Facility (on page 600)
Reconciliation Stages (on page 601)
• Stage 1. Preparation (Mandatory) (on page 601)
• Stage 2. Merge (Optional) (on page 602)
• Stage 3. Sum (Optional) (on page 602)
Reconciliation Work Flow (on page 603)
Activating Program CTBRECL (on page 603)
Reconciliation Functions (on page 604)
• WRITE (on page 604)
• SETKEY (on page 607)
• MERGE (on page 609)
• MERGEX (on page 612)
• SUM (on page 615)
• SUMX (on page 617)
DD Statements (on page 621)
Return Codes (on page 622)
Reconciliation Facility
Control-M/Analyzer includes a Reconciliation facility that can be used to
reconcile data from two different sources
Comparing data from two different sources (for example, files) is an integral aspect of data balancing.
A typical example is check reconciliation: A check register, updated on-line by a clerk as each check is
written, is periodically compared to an automatically generated bank statement. Two files are involved
in the process:
• check register – record of checks as they are issued
• bank statement – record of checks that cleared the bank during the week or month
Reconciliation is necessary to verify that the data from both sources match.
The sequence of the two files is not identical. The check register is typically in check number order.
The bank statement is typically in clearance date order.
600
Control-M/Analyzer User Guide
The Control-M/Analyzer Reconciliation facility verifies that each check that appears in one file also
appears in the other and that the check amounts are identical. Control-M/Analyzer prints out
non-matching checks.
facilitate processing of large files by providing summary records
A typical example involves a large sequential file that must be checked. Each record in the file belongs
to one of a hundred categories. Control-M/Analyzer summarizes the records by category and prints
out the total amount for each category.
The Control-M/Analyzer Reconciliation facility is implemented by the CTBRECL program that is invoked
through a DO CALLUSER statement. For a full description of the DO CALLUSER statement, see DO
CALLUSER: Automated Balancing Statement (on page 371).
Reconciliation Stages
A typical reconciliation scenario consists of the following stages. Use this explanation as a model for
identifying the stages in the reconciliation process at your site.
Example 1
Assume two files must be reconciled – a check register and a bank statement. The check register file
includes the account number, check number, check date, check amount, and payee for each check. The
bank statement file includes the bank name, account number, date received, check number, check
amount, and check date.
We instruct the Reconciliation facility to identify the check number as the key because this number exists
uniquely in both files. The two files are then sorted by check number. The check amount and check date
are retained as additional information.
The preparation stage is performed using the WRITE function. The WRITE function is used when the two
files being compared are in different formats (for example, have different record layouts).
Example 2
Assume two files – a check register (described above in Example 1) and an application report containing
the total sum value based on a bank statement report. We need to verify if the total sum is correct. Only
the check register needs to be reconciled. Therefore, the preparation stage is performed by the SETKEY
function that describes the record layout of the check register.
Note: Either the WRITE function or the SETKEY function can be specified for the preparation stage. Both
functions cannot be specified during the same reconciliation process.
601
Control-M/Analyzer User Guide
Example
Assume two files exist:
a summary report file contains three records per customer listing subtotals for local, long distance,
and international calls
a detail file lists all phone calls for each customer
First, the records in the detail file are sub-totaled by customer. Then, these subtotals are compared to the
subtotals for each customer in the summary report file.
Note: The MERGEX and SUMX functions cannot be invoked if the SETKEY function was specified in the
Preparation stage.
602
Control-M/Analyzer User Guide
Stage 1 is mandatory (for example, the WRITE or SETKEY function must be performed in preparation for
the reconciliation). The WRITE function is performed once on each file. The SETKEY function is performed
once for all files simultaneously.
Either Stage 2 or Stage 3 is then performed, depending upon the type of reconciliation.
Depending upon the reconciliation function specified, different parameters must be specified. A detailed
description of each reconciliation function and its corresponding parameters is provided below.
Note: The maximum number of parameters that can be passed to the CTBRECL program is 50. For a full
description of the DO CALLUSER statement, see DO CALLUSER: Automated Balancing Statement (on page
371).
603
Control-M/Analyzer User Guide
Reconciliation Functions
You can specify one of the reconciliation functions described in Table 290 when activating the CTBRECL
program.
Table 290 Reconciliation Functions
Function Description
WRITE Defines the input file record structure and restructures the fields in
user-defined order.
SETKEY Defines the key of the input file records to be used by the
Control-M/Analyzer Reconciliation facility.
MERGE Sorts the files involved in the reconciliation process and merges the
files into one combined output file.
MERGEX Sorts the files involved in the reconciliation, merges them, and
produces the unmatched records as output.
SUM Sorts the input files involved in the reconciliation process, sums
(subtotals) the records in each file by key, and merges the records
into a combined output file.
SUMX Sorts the input files involved in the reconciliation process, sums
(subtotals) records in each file by key, merges the records into a
combined output file, and produces the unmatched records as
output.
WRITE
The WRITE reconciliation function enables the user to define a canonical (ordered, sorted) file structure to
the Reconciliation facility. The WRITE function performs Stage 1, the Preparation stage, of the
Reconciliation facility.
The WRITE function should be performed when
comparing two files whose keys are not in the same position or format, for example, the record layout
of each file is essentially different
the MERGEX or SUMX function will be performed during the same reconciliation
The WRITE function must be performed separately on each file being reconciled. Each file is allocated and
processed using ON and WHEN statements.
Note: The SETKEY function can also perform Stage 1 of the reconciliation. For instructions on when to use
the SETKEY function, see SETKEY (on page 607).
604
Control-M/Analyzer User Guide
Syntax
DO CALLUSER = CTBRECL ARG recfunc, fileid, argnum, keylen1, keyvar1, ..., key-end-mark,
len1, var1, ...
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables, for
example, the values must be assigned before activating the CTBRECL program.
Table 291 Reconciliation Function WRITE Arguments
Argument Description
argNum Total number of all keyVar, keyLen, var, and len arguments
specified in this DO CALLUSER statement plus one (for argument
key-end-mark). argNum must be a Control-M/Analyzer Local
variable with a value that is numeric and odd. Mandatory.
keyVar Key field with which to build the canonized (ordered, sorted) file.
keyvar is usually extracted from the current file being processed.
Must be a Control-M/Analyzer Local variable.
Note: At least one keyLen and keyVar pair must be specified. The number of keyLen and
keyVar pairs is the maximum number of arguments that can be specified in a DO CALLUSER
statement. For details, see DO CALLUSER: Automated Balancing Statement (on page 371).
605
Control-M/Analyzer User Guide
Argument Description
keyEndMark Marker that indicates the end of the list of paired keyLen and
keyVar arguments. key-end-mark is specified immediately after all
keyLen and keyVar pairs and before all the len and var pairs in the
DO CALLUSER statement. Must be a Control-M/Analyzer Local
variable. The value of keyEndMark must be 0 (zero). Mandatory.
len Length of its corresponding argument var (see below) in bytes. len
must be a Control-M/Analyzer Local variable with a numeric value.
var Field that is available for information purposes, for example, not
part of the key. var is usually extracted from the current file being
processed. Must be a Control-M/Analyzer Local variable.
Note: The number of len and var pairs is limited by the maximum number of arguments
that can be specified in a DO CALLUSER statement. For details, see DO CALLUSER:
Automated Balancing Statement (on page 371).
General Information
The resulting format of the record generated by the WRITE function and referenced by the SORTIN
DD statement is:
where
<------ Sum of all key lengths -----> 1 byte <----- Sum of all lengths ----->
Note: The WRITE function requires a preexisting work file referenced by the SORTIN DD statement. The
LRECL (record length allocation parameter) for this work file must be equal to or greater than the sum of
all keyLen values + len values + 1 (as defined above).
Invocation Results
The SYSURC system variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full explanation of CTBRECL return codes, see
Return Codes (on page 622).
Example
Assume that an input file contains fields for account numbers, check numbers, check dates, check
amounts, and payees. The key field (for example, the field that uniquely identifies each check) is the
check number (seven characters). The check amount (nine characters) and check date (nine characters)
are also included in the output.
606
Control-M/Analyzer User Guide
SETKEY
The SETKEY reconciliation function defines the record key of the records to be used by the Reconciliation
facility. The SETKEY function defines the record key for files that have similar record layouts, for
example, the key fields can be identified without any further processing.
The SETKEY or WRITE function can be run to perform Stage 1, the Preparation stage, of the
Reconciliation facility.
The SETKEY function should be run when
reconciling one (usually large) existing input file – for example, to produce summary records
In this case, the SETKEY function can be performed on the file without merging afterward
607
Control-M/Analyzer User Guide
Syntax
DO CALLUSER = CTBRECL ARG recFunc, argNum, offset1, len1, offset2, len2, ...
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables.
For example, the values must be assigned before activating the CTBRECL program.
Table 292 SETKEY Reconciliation Function Arguments
Argument Description
offset Starting position of the corresponding record key in the file being
processed (for example, if the starting position is the left-most
column in a record, set the value of offset to 1). Must be a
Control-M/Analyzer Local variable with a numeric value.
Note: At least one offset and len pair must be specified. The number of offset and len pairs
is limited by the maximum number of arguments that can be specified in a DO CALLUSER
statement. For details, see DO CALLUSER: Automated Balancing Statement (on page 371).
608
Control-M/Analyzer User Guide
Invocation Results
The SYSURC stem variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full explanation of CTBRECL return codes, see
Return Codes (on page 622).
Example
Assume a file includes a transaction code in columns 17 to 23 (7 characters in length), and a transaction
amount in columns 30 to 38 (9 characters in length). These two fields comprise the record key.
The Control-M/Analyzer rule below illustrates how to define this key to the Control-M/Analyzer
Reconciliation facility.
The first block, SETKEY, initializes the variables necessary for performing the Preparation stage through
the SETKEY function and performs this function on the file.
Subsequent blocks perform the reconciliation.
Figure 364 Reconciliation Function SETKEY Example
LIBRARY : CTB.PROD.RULES RULE : SETKEY
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M43 GROUP BANKING_DEPARTMENT
UPDATED 08/08/00 - 15:32:32 BY M43
DESC RECONCILIATION FACILITY SETS KEY FIELDS
OPTIONS
===========================================================================
EXECUTE SETKEY UPON C
ON DATA
ALWAYS
DO SET = RECFUNC='SETKEY' C
DO SET = LEN1=7 C
DO SET = LEN2=9 C
DO SET = OFFSET1=17 C
DO SET = OFFSET2=30 C
DO SET = ARGNUM=4 C
DO CALLUSER = CTBRECL ARG RECFUNC,ARGNUM,OFFSET1,LEN1,OFFSET2,LEN2 C
===========================================================================
EXECUTE RECONCIL UPON C
ON DATA
PLEASE FILL IN RULE DEFINITION. 15.32.29
MERGE
If more than one input file is involved in the reconciliation process, the MERGE function sorts the files
involved and merges them into one output file referenced by the SORTOUT DD statement.
The Preparation stage, using either the WRITE or SETKEY function (but not both), must precede the
Merge stage. The output of the WRITE function, or the original input file when using the SETKEY function,
is the input for the MERGE function.
The output of the MERGE function is a file containing all the records from the original files. The SORTOUT
DD statement must be included in the job that invokes the reconciliation rule. For more information, see
DD Statements (on page 621).
The next block in the reconciliation rule is usually an ON DDNAME SORTOUT block that scans the output
of the MERGE function.
609
Control-M/Analyzer User Guide
Note: The SORTOUT file should be allocated with the same LRECL (record length parameter) as the
SORTIN file.
Syntax
DO CALLUSER = CTBRECL ARG recfunc
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables.
For example, the values must be assigned before activating the CTBRECL program.
Table 293 MERGE Reconciliation Function Arguments
Argument Description
Invocation Results
The SYSURC system variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full description of CTBRECL return codes, see
Return Codes (on page 622).
Example
The sample rule illustrated below specifies the following:
The first block, SETUP, initializes variables for performing the Preparation stage using the WRITE
function.
The next two blocks, WRITE1 and WRITE2, perform the WRITE function on both input files. The
check number is the key.
The fourth block, MERGE, performs the MERGE function.
The fifth block, TEST, prints out the check numbers.
610
Control-M/Analyzer User Guide
611
Control-M/Analyzer User Guide
MERGEX
The MERGEX reconciliation function sorts the files involved in the reconciliation process, merges them into
one output work file, and produces the unmatched records as output.
The WRITE function of the Preparation stage must be performed on both files before the MERGEX stage
can be performed. The SETKEY function cannot be run in preparation for the MERGEX function.
The input file for the MERGEX function must be referenced by the SORTIN DD statement. The MERGEX
output work file must be referenced by the SRTOUT DD statement.
The output of the MERGEX function is a file containing only unmatched records. The output is referenced
by the SRECOUT1 DD statement that must be included in the job that invokes the reconciliation rule. For
more information, see DD Statements (on page 621). An optional output file, referenced by the
SRECOUT2 DD statement, includes all matched records from the original files. This optional output file is
produced if parameter match is set to YES and the SRECOUT2 DD statement is included in the job that
invokes the reconciliation rule.
The next block in the reconciliation rule is usually an ON DDNAME SRECOUT1 block that scans the
MERGEX output and prints a message for each unmatched record.
Syntax
DO CALLUSER = CTBRECL ARG recfunc, match
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables.
For example, the values must be assigned before activating the CTBRECL program.
Table 294 MERGEX Reconciliation Function Arguments
Function Description
match Flag that indicates whether matching records should also be listed.
Must be a Control-M/Analyzer Local variable. Mandatory.
YES – Matching values should be listed in a separate file
referenced by SRECOURT2 DD statement. Unmatched records
are listed in a file referenced by the SRECOUT1 DD statement.
NO – Matching values should not be listed. Unmatched records
are listed in a file referenced by the SRECOUT1 DD statement.
612
Control-M/Analyzer User Guide
Invocation Results
The SYSURC system variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full description of CTBRECL return codes, see
Return Codes (on page 622).
Example
The sample rule below specifies the following:
The first block, SETUP, initializes the variables necessary for performing the Preparation stage using
the WRITE function.
The next two blocks, WRITE1 and WRITE2, perform the WRITE function on both files.
The fourth block, MERGEX, sorts the files, merges them, and produces unmatched records as output
The fifth block, OUTPUT, prints out the unmatched check information.
613
Control-M/Analyzer User Guide
614
Control-M/Analyzer User Guide
SUM
The SUM reconciliation function sorts the files involved in the reconciliation process, sums identical key
records in the files, and merges the summed records into one output file referenced by the SORTOUT
DD statement.
The Preparation stage, using either function WRITE or SETKEY (but not both), must precede the Sum
stage. The output of the WRITE function, or the original input file when using the SETKEY function, is the
input for the SUM function.
The output of the SUM function is a file containing the summed records calculated from records in the
original files. The SORTOUT DD statement must be included in the job that invokes the reconciliation rule.
For more information, see DD Statements (on page 621).
The next block in the reconciliation rule is usually an ON DDNAME SORTOUT block that scans the output
of the SUM function.
Syntax
DO CALLUSER = CTBRECL ARG recFunc, argNum, offset1, len1, fldType1, offset2, len2,
fldType2, ...
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables.
For example, the values must be assigned before activating the CTBRECL program.
Table 295 SUM Reconciliation Function Arguments
Argument Description
615
Control-M/Analyzer User Guide
Argument Description
Invocation Results
The SYSURC system variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full explanation of CTBRECL return codes, see
Return Codes (on page 622).
Example
Assume that a file contains records that list customer transactions on Automatic Teller Machines (ATMs).
An automatic teller machine identifier (ATMID) is attached to each transaction, in columns 30 through 36.
We would like to subtotal the transaction amount field, a signed zoned decimal field in columns 20
through 27, by ATMID.
The sample rule below specifies the following:
The first block, SETKEY, initializes the variables required by the SETKEY function and performs the
SETKEY function on the input file.
The next block, SUM, initializes the variables necessary for performing the SUM function and performs
the SUM function on the file.
The third block, TEST, prints the summed records.
616
Control-M/Analyzer User Guide
SUMX
The SUMX reconciliation function does the following:
1. It sorts the files involved in the reconciliation process.
2. It sums identical key records in each file.
3. It merges the summed records into one output work file.
4. It produces an output file containing unmatched records.
5. Optionally, it produces another output file containing matched records.
The Preparation stage must be performed using the WRITE function on both input files before the SUMX
function can be performed. The SETKEY function cannot be run in preparation for the SUMX function.
The input file for the SUMX function must be referenced by the SORTIN DD statement. The output work
file for summed records must be referenced by the SORTOUT DD statement.
The output of the SUMX function includes a file containing all unmatched records. This output file is
referenced by the SRECOUT1 DD statement, which must be included in the job that invokes the
reconciliation rule. For more information, see DD Statements (on page 621).
617
Control-M/Analyzer User Guide
An optional output file, referenced by the SRECOUT2 DD statement, includes all matched records from the
original files. This optional output file is produced if parameter match is set to YES and the SRECOUT2
DD statement is included in the job that invokes the reconciliation rule.
The next block in the reconciliation rule is usually an ON DDNAME SRECOUT1 block that scans the SUMX
output and prints an error message for each unmatched summary record.
Syntax
DO CALLUSER = CTBRECL ARG recFunc, match, sumExcl, argNum, offset1, len1, fldType1, ...
Arguments
All arguments passed to the CTBRECL program must be predefined Control-M/Analyzer Local variables.
For example, the values must be assigned before activating the CTBRECL program.
Table 296 Reconciliation Function SUMX Arguments
Argument Description
match Flag that indicates whether matched records should also be listed.
Must be a Control-M/Analyzer Local variable. Mandatory. Valid
values are:
YES – Matched records should be listed in a separate file
referenced by the SRECOUT2 DD statement. Unmatched
records are listed in a file referenced by the SRECOUT1
DD statement.
NO – Matched records should not be listed. Unmatched records
are listed in a file referenced by the SRECOUT1 DD statement.
SumExcl This argument is reserved for future use. In the meantime, set
sumExcl to zero. Mandatory.
618
Control-M/Analyzer User Guide
Argument Description
Invocation Results
The SYSURC system variable indicates the results of invoking the CTBRECL program. A zero value in
SYSURC indicates successful completion of the stage. For a full explanation of CTBRECL return codes, see
Return Codes (on page 622).
Example
Assume that two files exist:
The first file contains all ATM transaction records for a specific day.
The second file contains summary amounts (totals) per ATM for that day.
We would like to total the records in the first file per ATM, and then compare these totals to the second
file. This will indicate if any ATM transactions are included in only one of the two files, but not both.
The sample rule below specifies the following:
The first block, SETUP, initializes the variables needed to perform the WRITE function on each file.
The next two blocks, WRITE1 and WRITE2, perform the WRITE function on the two files. These
blocks bring the two files to an ordered format, where ATMID comprises the record key.
The fourth block, SUMX, initializes variables for the SUMX function and performs the SUMX function to
sum the transaction amounts by ATMID.
The last block, TEST, prints the unmatched records that exist in only one of the two files.
619
Control-M/Analyzer User Guide
620
Control-M/Analyzer User Guide
DD Statements
The Reconciliation facility requires a number of DD statements that must be included in the JCL of the job
invoking the reconciliation rule:
Table 297 Required DD Statements for the Reconciliation Facility
Statement Description
SORTOUT Output of the MERGE and SUM functions. Work file for the MERGEX
and SUMX functions.
SORTWKnn Temporary work space files. The amount of work space required
depends on the number of records processed.
Three sample JCL members that invoke a reconciliation rule are illustrated in the following examples.
Example 1
Figure 369 JCL Member that Invokes a Reconciliation Rule – Example 1
//... JOB ...
// EXEC CONTROLB,RULE=reconcile-rule
//SORTIN DD DSN=pre-allocated-file or temporary files,DISP=SHR
//SORTOUT DD DSN=empty-pre-allocated-file or temporary files,DISP=SHR
//SORTOUT1 DD DSN=empty-pre-allocated-file or temporary files,DISP=SHR
//SORTOUT2 DD DSN=empty-pre-allocated-file or temporary files,DISP=SHR
//SORTWK01 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK02 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK03 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SYSOUT DD SYSOUT=held-class
//
621
Control-M/Analyzer User Guide
Example 2
This job invokes a rule that calls the WRITE and MERGEX functions. Output includes both matching and
non-matching records.
Figure 370 JCL Member that Invokes a Reconciliation Rule – Example 2
//... JOB ...
// EXEC CONTROLB,RULE=write and mergex
//SORTIN DD DSN=empty-pre-allocated-file,DISP=SHR
//SORTOUT DD DSN=empty-pre-allocated-file,DISP=SHR
//SRECOUT1 DD DSN=empty-pre-allocated-file,DISP=SHR
//SRECOUT2 DD DSN=empty-pre-allocated-file,DISP=SHR
//SORTWK01 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK02 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK03 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SYSOUT DD SYSOUT=held-class
//
Example 3
This job invokes a rule that calls the SETKEY and SUM functions.
Figure 371 JCL Member that Invokes a Reconciliation Rule – Example 3
//... JOB ...
// EXEC CONTROLB,RULE=setkey and sum
//SORTIN DD DSN=our-input-file,DISP=SHR
//SORTOUT DD DSN=empty-pre-allocated-file,DISP=SHR
//SORTWK01 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK02 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SORTWK03 DD UNIT=SYSALLDA,SPACE=(TRK,(5,10))
//SYSOUT DD SYSOUT=held-class
//
Return Codes
The return codes that can be returned by the CTBRECL program are described in Table 298.
Table 298 Return Codes for Program CTBRECL
Code Description
8 Internal error
Contact your BMC Customer Support for assistance.
622
Control-M/Analyzer User Guide
Code Description
24 Record key length for the first file is different from key length of the
second file
The total key length (for example, the sum of the lengths of the key
fields) specified for the first file differs from the total key length
specified for the second file. Correct the length of the keys and
rerun the rule.
36 No function requested
No valid recFunc Local variable was specified. For example, the
argument list begins with a comma. Define the recFunc parameter
and rerun the rule.
623
Control-M/Analyzer User Guide
Code Description
56 SORTOUT file block size too small to run the MERGEX and SUMX
functions
The work buffer is not large enough. Increase the block size
(blkSize) of the SORTOUT file and rerun the rule. The block size can
be overridden only by the DCB parameter in the SORTOUT JCL
DD statement.
60 SORTOUT block size too small (block size must be sufficient for at
least three records)
SORTOUT block size is not large enough. Increase the block size
(blkSize) of the SORTOUT file and rerun the rule. The block size can
be overridden only by the DCB parameter in the SORTOUT JCL
DD statement.
624
8
8
Report Generation
This chapter includes the following topics:
Report Types (on page 625)
Rule Activity Report (on page 625)
Dynamic Print Formatting Facility (on page 626)
Report Types
The following types of reports are available under Control-M/Analyzer:
reports produced automatically by the operation of Control-M/Analyzer
reports produced by scripts that utilize the IOA KeyStroke Language (KSL)
KSL scripts generate reports in batch mode that can be produced online with the Online facility. For
more information see the KeyStroke Language (KSL) User Guide.
Control-M/Analyzer special reports that cannot readily be produced using the Online facility or KSL.
Some Control-M/Analyzer reports are produced from information in the Rule Activity file, Report file or
IOA Log file. Other reports are produced from the Active Balancing file, mission definition files, and the
Database.
The Reporting facility can be activated at any time.
625
Control-M/Analyzer User Guide
***---------------------------------------------------------------***
*** GROUP : INTRAC JOBNAME : M42INSGS /JOB13530 ***
*** MISSION : ARMISS01 RULE : ARWARN01 ***
*** CATEGORY: DAILY OWNER : M66 ***
*** RUN ON : 02/02/99 - 11:47 ***
***---------------------------------------------------------------***
CTB109I- Compilation started
CTB110I- Compilation completed successfully
CTB111I- Highest error code was 0
*
** ENTERING BLOCK: CHECK OF TYPE DATA
*
PRT: TIME IS NOT BETWEEN 12 P.M. AND 6 P.M.
PRT: YOU'RE OK FOR NOW, BUT DO NOT RELAX
==SHOUT : 'TIME IS NOT BETWEEN 12 P.M. AND 6 P.M --- RELAX ************' To: TS
PRESS END TO RETURN. LEFT AND RIGHT TO SEE MORE. 12.12.15
626
9
9
Rollback Facility
This chapter includes the following topics:
Control-M/Analyzer Rollback Facility (on page 627)
Activating the Rollback Facility (on page 628)
Triggering the Rollback Facility through Control-M/Restart (on page 629)
Viewing Deleted Variable Generations (on page 630)
Displaying Rollback Results (on page 631)
627
Control-M/Analyzer User Guide
A confirmation window appears. To confirm the rollback, type Y and press Enter. To cancel the rollback,
type N and press Enter.
If the request is confirmed, variable generations committed by the selected rule invocation are deleted
(rolled back). Deleted variable generations continue to be displayed in the Online facility (Screens BA and
BV). However, these variable generations cannot be referred to or accessed by Control-M/Analyzer rules.
628
Control-M/Analyzer User Guide
After the rollback is completed, a message is displayed at the top of the screen.
629
Control-M/Analyzer User Guide
630
Control-M/Analyzer User Guide
The Database Variable display lists variable generations in creation date order, starting with the latest
generation. Rolled back generations are listed in their original position in the Database Variable display
with *** in the GENERATION field.
Figure 376 Rolled Back Generations in the Database Variable Display
--------<G>-------- GROUP INVENTORY VAR TOT* -------(BV.V)
COMMAND ===> SCROLL===> CRSR
O GROUP NAME --------- VARIABLE NAME ------ GENERATION ------------------------
INVENTRY TOT1 ***
Value : 90321
User Key : Run Id :
Creation Date : 08/08/00 17:19:39 By User : M43LBA Type : B
-------------------------------------------------------------------------------
INVENTRY TOT2 ***
Value : 90350
631
10
10
Control-M/Analyzer Interfaces
This chapter includes the following topics:
Control-M/Analyzer Interfaces (on page 632)
Interface to Control-M (on page 633)
• Using a DO CTBRULE statement (on page 633)
• Using the CTB STEP Parameter (on page 635)
Control-M Job Definition Screen Format (on page 636)
Interface to Control-D and Control-V (on page 637)
• Decollating Mission Definition Under Control-D and Control-V (on page 637)
Interface to User Programs (on page 640)
• Passing Arguments to and from Control-M/Analyzer (on page 641)
Control-M/Analyzer Interfaces
This chapter provides information about Control-M/Analyzer interfaces to other INCONTROL products and
user products.
When other INCONTROL products are used with Control-M/Analyzer at your site, the IOA integrated
environment produces optimal results. Control-M/Analyzer can interface directly to Control-M and
Control-D to enhance their capabilities and improve the quality of the production process.
User programs developed by your site can also communicate with the IOA Environment through
Control-M/Analyzer. This interface gives new capabilities to your local site applications.
The results of Control-M/Analyzer rules that run under the Control-M or Control-D monitor are in the
Control-M or Control-D monitor SYSOUT respectively.
The following Control-M/Analyzer interfaces are documented in this chapter:
interface to Control-M
interface to Control-D
interfaces to user programs
The Control-M/Analyzer interface to Control-M/Restart enables the CONTROLR procedure to trigger the
Control-M/Analyzer Rollback Facility. This interface is documented in Rollback Facility (on page 627).
632
Control-M/Analyzer User Guide
Interface to Control-M
The Control-M/Analyzer Runtime Environment can be invoked by specifying a DO CTBRULE statement or
the CTB STEP parameter in the Control-M Job Definition screen (only by users with Control-M and,
optionally, Control-M/Restart). These interfaces to Control-M/Analyzer enable balancing actions to be
performed on job sysouts and statistics. The name of the Control-M/Analyzer rules to be executed must
be specified. The called rule is read from the libraries referenced by the DABRULE DD statement.
Note: Passing of arguments from DO CTBRULE statements to an invoked Control-M/Analyzer rule is not
yet supported.
633
Control-M/Analyzer User Guide
The group name can be specified in the GROUP parameter of one of the following:
a Control-M/Analyzer rule
a Control-M scheduling definition
If a group name is specified in both of these GROUP parameters, the rule is implemented with the group
name specified in the Control-M scheduling definition.
634
Control-M/Analyzer User Guide
The ON SYSDATA Data Selection parameter can be specified within the Control-M/Analyzer rule definition
to indicate processing of SYSDATA. SYSDATA is an IOA term that designates the data in the following job
sysout datasets:
the job log (console messages)
the expanded JCL
the system output messages
SYSDATA is created by the AutoArchive facility provided by Control-M/Restart.
Control-M/Analyzer rules can add or delete prerequisite conditions. Control-M (and all other INCONTROL
products) can test for the existence of these conditions and react accordingly. Control-M/Analyzer rules
can also read, examine, and change AutoEdit symbol members, that can affect the submission of other
jobs.
Note: Control-M arguments passed to a Control-M/Analyzer rule are accessed by the rule using the
RARGnn System variable, where nn is the 2-digit number that indicates the position of the argument in
the argument list. For more information see Passing Arguments While Invoking Control-M/Analyzer (on
page 42).
635
Control-M/Analyzer User Guide
Subparameters
The CTB STEP parameter contains the subparameters described in Table 299
Table 299 CTB STEP Subparameters
Subparameter Description
Note: The 60-character ARGUMENTS line is displayed only after the CTB STEP line is filled in and Enter is
pressed.
636
Control-M/Analyzer User Guide
General Information
A maximum of two CTB STEP statements (such as, one START statement and one END statement) can be
specified. Upon filling in the first CTB STEP line on the screen and pressing Enter, the ARGUMENTS line
and the second CTB STEP line are displayed. If the second CTB STEP line is filled in and Enter is pressed,
its ARGUMENTS line is displayed.
Arguments are automatically passed to the Control-M/Analyzer step as a PARM=‘arguments’ parameter in
the JCL of the step.
The name of the Control-M/Analyzer procedure that is used in the CTB STEP statement is obtained from
the CTBPROC Control-M/Analyzer installation parameter.
The names of the Control-M/Analyzer steps in the job submitted by Control-M are determined by source
parameters in the CTBPARM member. The CTMSTSTA parameter specifies the name of the first step
added. The CTMSTEND parameter specifies the name of the last step added. Control-M reads the step
names specified in these parameters and uses them as the Control-M/Analyzer step names in the
submitted job.
637
Control-M/Analyzer User Guide
Note: Passing of arguments from DO CTBRULE statements to an invoked Control-M/Analyzer rule is not
yet supported.
Value Description
As illustrated on the following page, the SYSOPT System variable can be specified as criteria in the rule
definition to determine if an ON block should be processed. Initialization is usually performed during the
first Control-D or Control-V invocation of Control-M/Analyzer (such as, SYSOPT=CTDFIRST or CTVFIRST).
Each time a Control-D or Control-V page is passed to Control-M/Analyzer (such as, SYSOPT=CTDWORK or
CTVWORK), balancing operations are performed. After the last Control-D or Control-V page is received
(such as, SYSOPT=CTDLAST or CTVLAST), a DO TERMINAT statement is usually specified to determine
the balancing result.
638
Control-M/Analyzer User Guide
If DO TERMINAT is specified earlier than the CTDLAST (or CTVLAST) invocation, subsequent
Control-M/Analyzer invocations are not performed.
639
Control-M/Analyzer User Guide
The ON PAGE Data Selection parameter can be specified within the Control-M/Analyzer rule definition to
indicate processing of Control-D or Control-V pages. Each Control-D or Control-V page that meets the
Control-D or Control-V WHEN criteria is passed to Control-M/Analyzer for processing.
When a Control-M/Analyzer rule (invoked by Control-D or Control-V) terminates by a DO
TERMINAT=NOTOK statement, it is as if the DO NOTOK Control-D or Control-V command was issued. DO
NOTOK causes the decollating mission to terminate NOTOK.
Control-M/Analyzer can pass information back to Control-D or Control-V as follows. When a DO REMARK
Control-M/Analyzer statement is specified by a rule that was invoked by Control-D or Control-V, the first
20 characters of the remark are returned to Control-D or Control-V (as if the DO REMARK command was
issued in the decollating mission definition). This remark is displayed in certain Control-D and Control-V
User Report List formats.
Control-M/Analyzer rules can add or delete prerequisite conditions. Control-D and Control-V (and all other
INCONTROL products) can test for the existence of these conditions and react accordingly.
640
Control-M/Analyzer User Guide
Argument Description
Number of User Number of user arguments sent to the rule. This argument is 4
Arguments bytes (1 fullword) in length.
User arguments can be referenced by the rule through the RARGxx System variable. For example,
RARG01 corresponds to the first user Argument, RARG02 corresponds to the second user argument, and
so on
After rule termination, changes made to RARGxx System variable values during rule execution are
returned to the calling program (the user program that invoked the rule).
641
Control-M/Analyzer User Guide
642
11
11
Solveware Samples Kit
This chapter includes the following topics:
General (on page 643)
SolveWare Samples (on page 644)
Implementation Steps (on page 644)
• Step 1 – Study the Samples Kit documentation (on page 644)
• Step 2 – Customize the rules before implementation (on page 644)
• Step 3 – Test and implement the rules (on page 644)
Sample Rules (on page 645)
• Solveware Rule Documentation (on page 645)
• Rule Logic (on page 648)
General
The SolveWare Samples kit contains sample Control-M/Analyzer rules that help you implement
Control-M/Analyzer quickly and successfully at your site. These sample rules are based on rules created
by our customers when they implemented Control-M/Analyzer. We have generalized them and included
those rules that provide
rule writing tips and techniques to help you begin using Control-M/Analyzer
ideas on where to start the implementation, by illustrating case studies (top down balancing within an
application, cross-application balancing, and so on) implemented by our customers
additional examples illustrating how to utilize Control-M/Analyzer features (for example, the
Reconciliation facility)
The SolveWare Samples kit is composed of the following components:
Documentation
Printed documentation for the SolveWare Samples kit is provided in this chapter. This documentation
typically includes a General Description, Rule Logic, Technical Highlights, and Recommendations and
Implementation Tips for each sample rule in the kit.
Libraries
The Control-M/Analyzer installation tape includes the following three libraries:
• SOLVRULE—Sample Control-M/Analyzer rules
• IOA SAMPREPS—Sample reports (members named CTB...) used by the rules
• SOLVJCL—Sample jobs to invoke the rules
Refer to these libraries to understand the documentation in this chapter.
643
Control-M/Analyzer User Guide
SolveWare Samples
This chapter contains SolveWare relating to the following topics:
Rules 1A and 1B—Balancing Grand Totals
Rules 2A and 2B—Verifying Totals for Columns of Numbers
Rule 3 — Checking Each Line in a Report (With DO BLOCK Statements)
Rule 4 —Producing Formatted Reports (With the Dynamic Print Facility)
Rule 5—Producing Summary Records for Large Files (With Reconciliation Functions SETKEY and SUM)
Rule 6—Comparing Two Large Files (With Reconciliation Functions WRITE and MERGEX)
Implementation Steps
The steps involved in adopting, modifying and implementing the SolveWare samples are described below.
644
Control-M/Analyzer User Guide
Active mode
This is the production mode for Control-M/Analyzer rules. Data is evaluated and all actions defined by
the user are performed.
Sample Rules
SolveWare sample rules are documented on the following pages. When reviewing this documentation,
refer to the appropriate rule in the SOLVRULE library, the specified input report in the IOA SAMPREPS
library, and the corresponding JCL in the SOLVJCL library.
General Description
The following rules illustrate solutions to the following common requirement: to determine that report
totals are reasonable and consistent both internally and externally (such as, with information in other
reports). A sample inventory report, part of which is shown below, is used to demonstrate how this
requirement is satisfied.
645
Control-M/Analyzer User Guide
The rules extract one or more totals from a report and verify that the extracted quantities are reasonable.
They demonstrate how to take various actions if everything is OK and how to take other actions (for
example, print error messages to a user report, use the Shout facility to send messages to a TSO user ID,
and terminate a job with a status of NOTOK) if something is wrong.
Rule 1A extracts one total from a report and verifies that it is reasonable, which in this simple example
means over 1,000. Rule 1B extracts several totals and verifies that they are mutually consistent. The logic
of each rule is explained in more detail in Rule 1A Logic (on page 646) and Rule 1B Logic (on page 646)
below.
Rule 1A Logic
In the first block, read the report from the file, identify the grand totals line, and extract the total at
the bottom of the TOTAL QNTY column.
In the second block, verify that the extracted number is larger than 1000. If it is, perform the
following actions:
• Print the extracted quantity to the balancing report.
• Terminate the rule OK with a condition code of 0.
If it is not, perform the following actions:
• Print an error message to the balancing report
• Shout a message to a TSO userid
• Terminate the rule NOTOK with a condition code of 555
Rule 1B Logic
In the first block, read the report file, analyze the report to identify the grand totals line, and extract
grand totals for the QNTY AVAIL, QNTY ORDER and TOTAL QNTY columns into the variables QNTY1,
QNTY2 and QNTY3, respectively.
In the second block, verify that QNTY1 + QNTY2 = QNTY3. If it does not, perform the actions listed
in Rule 1A.
646
Control-M/Analyzer User Guide
Technical Highlights
The ON FILE statement identifies the file or library and member that contains the report to be
analyzed.
The library containing the rule is referenced in the BJCL1A or BJCL1B member by the DABRULE
DD statement.
The WHEN LINE/COL statement detects "TOTALS:" (a typical string for this type of balancing), the DO
EXTRACT statement obtains the totals from the same line (+0) that satisfied the WHEN statement.
SYSJOBNAME and SYSDATE System variables are used in Rule 1B DO SHOUT and DO PRINT
statements to refer to the current job name and date.
General Description
The following rules illustrate the automation of another common task: Determine that the sum of the
numbers listed in a vertical column of a report equals the total for that column printed in the report. A
slightly modified copy (Figure 387) of the inventory report used for Rule 1A is used to demonstrate how
this task is accomplished.
647
Control-M/Analyzer User Guide
Each rule contains two independent WHEN statements. The first WHEN statement uses the presence of
unique punctuation (a hyphen in column 6) to identify detail lines. Each "detail" line lists information
about a specific item in the warehouse. It is identified by a catalog number on the left side of the line.
Every catalog number has the same structure (XXXX-XXX-XX). Therefore, every detail line has a hyphen in
column 6.
The DO EXTRACT statement automatically sums the extracted quantities when parameter TYPE is set to
SU (sum). The DO EXTRACT statement uses the BFNUM process to convert formatted numbers (for
example, with commas) for mathematical comparisons.
The second WHEN statement identifies a total line and extracts totals from that line (+0). This process is
very similar to that of Rule 1.
If the calculated sum of the numbers extracted from the column does not equal the total for that column
contained in the report, appropriate notification is sent to specified locations using the Shout facility.
Rule Logic
The INPUT block reads a report in page mode from the sysout file referenced by the SYSUT2
DD statement. This block contains two independent WHEN statements. The first one looks for detail lines
and sums the appropriate column entries. The second one looks for the total line and extracts the
appropriate column totals.
648
Control-M/Analyzer User Guide
Rule Description
If QTYA does not equal QTYB: Print the calculated and extracted totals in the
balancing report.
Use the Shout facility to announce that the job
identified in the SYSJOBNAME System variable is
not balanced.
Terminate with NOTOK rule status and a
condition code of 555.
Technical Highlights
The ON SYSOUT statement indicates that the sysout file referenced by the SYSUT2 DD statement is
the input file to be balanced.
The JCL for this rule uses the IEBGENER utility to produce the sysout file that is identified using the
ON SYSOUT statement. However, the same sysout file could have been generated by any user
application program or some other utility. For more detailed information about utilities, see the
INCONTROL for z/OS Utilities Guide.
649
Control-M/Analyzer User Guide
General Description
This rule illustrates how to perform a number of checks on every line of a report. This is implemented
using the Control-M/Analyzer DO BLOCK statement.
The employee personnel report shown below is used with this rule. On each employee line, the rule
performs three checks:
Is the salary greater than or equal to 90,000?
Are sick days greater than or equal to 14?
Are vacation days greater than 31?
For each line with an error, the employee details are printed with an appropriate error message.
650
Control-M/Analyzer User Guide
Technical Highlights
At the end of the INPUT block, the DO BLOCK statement calls the CHECK block to determine if each
extracted value is reasonable.
The error counter, the ERROR Local variable, is incremented every time an error is encountered in the
CHECK block.
The END block is executed one time after all detail lines have been examined.
651
Control-M/Analyzer User Guide
Rule Logic
The rule structure above is illustrated in Table 303.
Table 303 Solveware Rule Structure
EXECUTE INPUT
ON SYSOUT...
WHEN
DO EXTRACT EMP_NUM
DO EXTRACT SICK
DO BLOCK CHECK
EXECUTE END
ON DATA
IF ERROR >0
DO TERMINATE NOTOK
ELSE
DO TERMINATE OK
EXECUTE CHECK
ON DATA
IF SICK > 14
DO PRINT...
652
Control-M/Analyzer User Guide
653
Control-M/Analyzer User Guide
Rule Name: Producing Formatted Reports (with the Dynamic Print Facility)
General Description
This rule demonstrates how the Control-M/Analyzer Dynamic Print facility can be used to produce
formatted output reports.
This rule extracts records for all employees whose annual salary is over 40,000 and prints them in a table
using various formatting options. The report consists of the following fields:
Social Security number (printed as is)
Salary (with thousand delimiter and 2 digits after the decimal point)
Insurance (with no thousand delimiter and 2 digits after the decimal point)
Union dues (with the minus sign to the right of the number)
Vacation days (right justified in a field with a length of 6 bytes)
The input report is identical to the report used by Rule 3:
654
Control-M/Analyzer User Guide
Rule Logic
The INIT block prints the report header.
For every employee whose annual salary is over 40,000, the PROC block
• extracts 5 data elements: social security number, annual salary, insurance, union dues, and
vacation days
• formats and prints the extracted values as required
The END block always terminates the rule with OK status and a condition code of 0.
Technical Highlights
The input file is identified in the ON FILE statement and read in DS (dataset) mode.
The Dynamic Print facility is invoked as part of the DO PRINT command to format all four variables
that need to be formatted.
Typical formats for popular numeric fields are illustrated.
Figure 392 Solveware Rule Logic (4)
Rule Name: Producing Summary Statistics for Large Files (with Reconciliation Functions
SETKEY and SUM)
Rule Member: BRULE5
655
Control-M/Analyzer User Guide
General Description
This rule produces subtotals by record attributes. The input file for this rule contains an record type
attribute field (car type) in columns 19-23 and a transaction amount to be totaled (in packed decimal
format) in columns 35-41. The rule produces transaction amount subtotals by car type.
This rule shows how to use the SETKEY and SUM functions of the Reconciliation facility. The summary
results are written to the file referenced by the SORTOUT DD statement, then formatted and printed in
the Rule Activity report.
Rule Logic
In the SETKEY block
Define the car type as a 5-character key beginning in column 19.
Use statement DO CALLUSER to invoke the SETKEY function of the Reconciliation facility and define
car type as the key.
Print the system user code to the Rule Activity report.
In block SUM:
Specify the transaction amount as the field to be summed. This field is a 7 character packed decimal
field beginning in column 35.
Use statement DO CALLUSER to invoke the SUM function of the Reconciliation facility to perform the
summation.
Print the system user code to the Rule Activity report.
The Reconciliation function results are printed in block PRINT:
Scan all records in the file referenced by DD statement SORTOUT. This file contains the summary
records written as output of the SUM function in the previous block.
For each summary record:
• Extract the car type from columns 19-23.
• Extract and convert (from packed decimal) the transaction amount.
• Print both fields.
The END block always terminates the rule with status OK and a condition code of zero.
656
Control-M/Analyzer User Guide
Technical Highlights
The record key is defined in the "SETKEY" block. The SETKEY function requires two parameters
(offset and length) for each segment of the key. In this case, the key has only one segment: the 5
columns starting in column 19.
Each field to be totaled is defined in the "SUM" block. The SUM function requires three parameters
(offset, length, field type) for each field being totaled. In this example, only one field is being totaled:
a packed decimal value in the seven columns starting in column 35.
The BUNPK process converts numbers (without decimals) and the BUNPKn process converts numbers
(with n decimals) from packed format to standard decimal character format. The DO SET following
this DO EXTRACT eliminates any leading zeros resulting from this conversion.
Rule Name: Comparing Two Large Files (with Reconciliation Functions WRITE and MERGEX)
657
Control-M/Analyzer User Guide
General Description
This rule demonstrates how the Reconciliation facility can compare two files whose keys can be matched
and produce a list of discrepancies. Both input files for this rule contain information about customer
checks, for example, check numbers and check amounts, but the record formats of the files are not the
same.
This rule uses the WRITE and MERGEX Reconciliation facility functions to detect non-matching records in
two dissimilar check files. Matching is based on check number. The resulting report provides check
number, check amount, and a field (file indicator) that indicates in which file the unmatched check
appears.
Rule Logic
In the PREPARE block, set up Local variables required for the WRITE function.
In the WRITE1 and WRITE2 blocks
• specify the input file
• specify the lines to be searched (.AL. indicates all lines)
Use DO EXTRACT statements to extract the check number and check amount (from their respective
locations in the two files).
Use the DO CALLUSER statement to invoke the WRITE function.
In block MERGEX
Use DO CALLUSER statement to invoke the MERGEX function that compares the two files prepared in
the two previous blocks.
The RESULT block prints unmatched records found by the MERGEX function:
Scan all records in the file referenced by the SRECOUT1 DD statement. This file contains all of the
unmatched records found by the MERGEX Reconciliation function.
For each unmatched record:
• Extract the check number.
• Extract the check amount.
• Extract the file indicator (1 or 2) that provides information about the type of problem.
• Print all of the extracted fields.
Block END always terminates the rule with status OK and a condition code of zero.
Technical Highlights
Each of the two input files is referenced in a separate block by its own ON FILE statement. The input files
do not have identical formats. Each file's record key and additional fields are defined in each invocation of
the WRITE function.
658
Control-M/Analyzer User Guide
659
12
12
A Editing Rule Definitions in the IOA Edit
Environment
Rule Definition parameters can be edited (moved, copied, deleted, repeated) by performing line editing
commands, similar to standard ISPF line commands, from within the IOA Edit environment.
The Edit environment in a Rule Definition screen is accessed by typing EDIT in the COMMAND field and
pressing Enter.
Figure 394 Edit Environment in The Rule Definition Screen
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+--------------------------------------------------------------------------+
__ OWNER M43 GROUP ACCT_INV
__ UPDATED 08/08/00 - 15:25:54 BY M43
__ DESC REORDER INVENTORY ITEM CHR001 IF NECESSARY
__ OPTIONS
__ ======================================================================
__ /* INITIALIZATION OF THE MINIMUM AMOUNT REQUIRED ON-HAND FOR
__ /* INVENTORY ITEM CHR001.
__ EXECUTE SETUP UPON C
__ ON DATA
__ ALWAYS
__ DO SET = MIN_CHR001=100 C
__ DO
__ (ENTER "ALWAYS", "IF")
__ =========================================================================
__ /* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
__ /* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
__ EXECUTE CHECK UPON C
__ ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
__ MODE PG LINECT 0060 DATASTAMP
__ WHEN LINE 001 - 060 COL 010 - 020 TYPE STOP AND/OR
PLEASE FILL IN RULE DEFINITION. 08.50.43
A 2-character line editing command field, marked by underscores, is displayed for each line on the screen.
Editing commands are typed directly onto these underscores.
Incorrectly specified line editing commands can be corrected by typing over them correctly. Line editing
commands can be deleted by blanking them out or by specifying the RESET command in the COMMAND
field.
Specified line editing commands are processed when Enter is pressed.
Control-M/Analyzer performs automatic syntax checking to ensure that the rule definition is still
syntactically correct after editing. If an edit will invalidate the rule definition, a message is displayed at the
top of the screen and the edit is not performed. For guidelines and recommendations for editing rule
definitions, see Maintaining Valid Rule Definitions (on page 664).
All operations available in the Rule Definition screen can be performed while in the Edit environment (for
example, parameter values may be changed, the Rule Definition screen may be saved, and the screen
exited).
660
Control-M/Analyzer User Guide
To exit the Edit environment, retype EDIT in the COMMAND field and press Enter. Line editing command
fields are removed from the display.
Logical Lines All parameter lines for a specific parameter, including its
subparameters and continuation lines.
Examples:
WHEN, whose subparameters span several lines.
EXECUTE, whose continuation lines span several lines.
Separator Lines A line of equal signs that separates EXECUTE blocks on the Rule
Definition screen. Separator lines are not processed during rule
execution.
661
Control-M/Analyzer User Guide
Command Effect
Command Effect
Copy commands are used in conjunction with Location commands. The lines and blocks are
placed at the position indicated by Location command A or B (described below).
662
Control-M/Analyzer User Guide
Command Effect
Move commands are used in conjunction with Location commands. The lines and blocks are
placed at the position indicated by Location command A or B (described below).
Command Effect
The repeated lines and blocks are placed immediately after the lines and blocks marked
with the command.
Command Effect
I Inserts a new logical line or block after the logical line or block
marked with an I.
663
Control-M/Analyzer User Guide
Command Effect
A (After) Indicates that lines or blocks should be placed after the line marked
with an A.
B (Before) Indicates that lines or blocks should be placed before the line
marked with a B.
Location commands A and B are used in conjunction with Copy (C, CS, CL, CC, CB) and
Move (M, MS, ML, MM, MB) commands.
664
Control-M/Analyzer User Guide
Examples
Example 1
Insert additional DO statements within a DO block using command I (Insert).
Figure 395 Example 1 - Using Insert Command - Before
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+--------------------------------------------------------------------------+
__ ===========================================================================
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATA BASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATA BASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ ALWAYS
I DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
__ DO
__ IF CURR_ONHAND>=MIN_CHR001 C
__ DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
__ ===========================================================================
__ EXECUTE UPON C
__ ON
PLEASE FILL IN RULE DEFINITION. 08.53.27
665
Control-M/Analyzer User Guide
Example 2
Delete an EXECUTE block. Use of the DB (Delete Block) command is the preferred method. The DB
command removes all parameters, comments, continuation lines, and separator lines of the specified
block. DB must be specified on a main line of the block (such as, EXECUTE or ON). In this example, the
SETUP EXECUTE block (indicated by A) is deleted.
Figure 397 Example 2 - Using Delete Command - Before
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+--------------------------------------------------------------------------+
__ OWNER M43 GROUP ACCT_INV
__ UPDATED 08/08/00 - 15:25:54 BY M43
__ DESC REORDER INVENTORY ITEM CHR001 IF NECESSARY
__ OPTIONS
__ ===========================================================================
__ /* INITIALIZATION OF THE MINIMUM AMOUNT REQUIRED ON-HAND FOR
__ /* INVENTORY ITEM CHR001.
DB EXECUTE SETUP UPON C
__ ON DATA
__ ALWAYS
__ DO SET = MIN_CHR001=100 C
__ ===========================================================================
__ /* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
__ /* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
__ EXECUTE CHECK UPON C
__ ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
__ MODE PG LINECT 0060 DATASTAMP
__ WHEN LINE 001 - 060 COL 010 - 020 TYPE STOP AND/OR
__ STRING = CHR001
__ DO EXTRACT = CURR_ONHAND
PLEASE FILL IN RULE DEFINITION. 08.59.42
The SETUP EXECUTE block has been deleted. EXECUTE block CHECK has scrolled upwards on the Rule
Definition screen.
Figure 398 Example 2 - Using Delete Command - After
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+--------------------------------------------------------------------------+
__ OWNER M43 GROUP ACCT_INV
__ UPDATED 08/08/00 - 15:25:54 BY M43
__ DESC REORDER INVENTORY ITEM CHR001 IF NECESSARY
__ OPTIONS
__ ===========================================================================
__ /* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
__ /* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
__ EXECUTE CHECK UPON C
__ ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
__ MODE PG LINECT 0060 DATASTAMP
__ WHEN LINE 001 - 060 COL 010 - 020 TYPE STOP AND/OR
__ STRING = CHR001
__ DO EXTRACT = CURR_ONHAND
__ LEVEL 0 LINE +000 COL +050 - +060 PROCESS TYP
__ DO
__ WHEN LINE - COL - TYPE STOP AND/OR
__ STRING =
__ DO
__ ===========================================================================
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATA BASE VARIABLE
PLEASE FILL IN RULE DEFINITION. 09.00.12
666
Control-M/Analyzer User Guide
Example 3
Move multiple DO statements from one sub-block to another. The MM (Multiple Move) command is
specified at the beginning and the end of the DO statements that are moved. The B (Before) command
specifies the location before which these lines are placed.
Figure 399 Example 3 - Using Move Command - Before
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+--------------------------------------------------------------------------+
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATABASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATABASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ ALWAYS
MM DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
MM DO SET = REASON=TOLER(CURR_ONHAND,MIN_CHR001,10) C
__ DO
__ IF CURR_ONHAND>=MIN_CHR001 C
B_ DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
__ ===========================================================================
__ EXECUTE UPON C
__ ON
PLEASE FILL IN RULE DEFINITION. 09.02.21
The two DO SET statements have been moved to the specified location.
Figure 400 Example 3 - Using Move Command - After
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATABASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATABASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ ALWAYS
__ DO
__ IF CURR_ONHAND>=MIN_CHR001 C
__ DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
__ DO SET = REASON=TOLER(CURR_ONHAND,MIN_CHR001,10) C
__ DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
__ ===========================================================================
__ EXECUTE UPON C
__ ON
PLEASE FILL IN RULE DEFINITION. 09.03.16
Now, the ALWAYS sub-block should be deleted. The DB (Delete Block) command is used to remove this
sub-block from the definition.
667
Control-M/Analyzer User Guide
The ALWAYS sub-block has been deleted. The IF sub-block has scrolled upwards on the Rule Definition
screen.
Figure 402 Example 3 - After Deleting Sub-Block – After
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATABASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATABASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ IF CURR_ONHAND>=MIN_CHR001 C
__ DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
__ DO SET = REASON=TOLER(CURR_ONHAND,MIN_CHR001,10) C
__ DO PRINT = DO NOT REORDER; SURPLUS=%%DIFFER F C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
__ ===========================================================================
__ EXECUTE UPON C
__ ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
If CURR_ONHAND is less than MIN_CHR001, the DO statements specified after parameter ELSE are
processed. The DO after the ELSE refers to variable %%DIFFER, but %%DIFFER has not been set
appropriately. Copy the appropriate DO statements from IF to ELSE using the CC and B commands.
668
Control-M/Analyzer User Guide
669
Control-M/Analyzer User Guide
Example 4
Copy a WHEN statement and some of its DO statements to another EXECUTE block. The CC (Multiple
Copy) command is specified at the beginning and the end of the parameters that are copied. The B
(Before) command specifies the location before which these lines are placed.
Figure 405 Example 4 - Using Copy Command - Before
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
__ ===========================================================================
__ /* DETERMINE CURRENT ON-HAND QUANTITY OF INVENTORY ITEM CHR001 BY
__ /* EXTRACTING THIS VALUE FROM SYSOUT DDNAME INVENTRY.
__ EXECUTE CHECK UPON C
__ ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
__ MODE PG LINECT 0060 DATASTAMP
CC WHEN LINE 001 - 060 COL 010 - 020 TYPE STOP AND/OR
__ STRING = CHR001
__ DO EXTRACT = CURR_ONHAND
CC LEVEL 0 LINE +000 COL +050 - +060 PROCESS TYP
__ DO COMMIT = NOW VAR CURR_ONHAND C
__ DO
__ WHEN LINE - COL - TYPE STOP AND/OR
__ STRING =
__ DO
===========================================================================
.
.
.
.
.
.
__ ===========================================================================
__ EXECUTE CHECK2 UPON C
__ ON SYSOUT PROCST PGMST DDNAME INVENTRY JOBNM
__ MODE PG LINECT 0060 DATASTAMP
B_ WHEN LINE - COL - TYPE STOP AND/OR
__ STRING =
__ DO
===========================================================================
__ EXECUTE UPON C
__ ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
The specified WHEN statement and DO statements have been successfully copied.
670
Control-M/Analyzer User Guide
Example 5
Insert a continuation line between existing continuation lines. BMC recommends that command R
(Repeat) be used to repeat the previous logical line.
Figure 407 Example 5 - Using Insert Command - Before
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
_ ===========================================================================
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATABASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATABASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ ALWAYS
__ DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
__ DO
__ IF CURR_ONHAND>=MIN_CHR001 C
__ DO PRINT = DO NOT REORDER F C Y
R SURPLUS=%%DIFFER C Y
__ NO AUTHORIZATION FOR REORDER C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
===========================================================================
PLEASE FILL IN RULE DEFINITION. 09.24.39
671
Control-M/Analyzer User Guide
The continuation line has been repeated. The repeated line can be modified as necessary.
Figure 408 Example 5 - Using Copy Command - After
LIBRARY : CTB.PROD.RULES RULE : REORDER
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
__ ===========================================================================
__ /* COMPARE THE CURRENT ON-HAND AMOUNT (DATABASE VARIABLE
__ /* CURR_ONHAND) TO THE MINIMUM REQUIRED AMOUNT (DATABASE VARIABLE
__ /* MIN_CHR001). DETERMINE IF REORDERING IS NECESSARY, AND PRINT A
__ /* MESSAGE INDICATING THE RESULTS
__ EXECUTE COMPARE UPON C
__ ON DATA
__ ALWAYS
__ DO SET = DIFFER=CURR_ONHAND-MIN_CHR001 C
__ DO
__ IF CURR_ONHAND>=MIN_CHR001 C
__ DO PRINT = DO NOT REORDER F C Y
__ SURPLUS=%%DIFFER C Y
__ SURPLUS=%%DIFFER C Y
__ NO AUTHORIZATION FOR REORDER C
__ DO
__ ELSE
__ DO PRINT = REORDER; DEFICIT=%%DIFFER F C
__ DO
__ (ENTER "ALWAYS", "IF")
PLEASE FILL IN RULE DEFINITION. 09.26.02
672
13
13
B Reserved Words
Control-M/Analyzer reserves certain words for its own use. These words are listed in the table in this
appendix. They should not be specified when naming rules, missions, variables, and so on. This
prohibition applies to all Control-M/Analyzer function names and system variable names.
An additional restriction prohibits user-designated variable names and expressions that begin with the
letters SYS. Control-M/Analyzer reserves all names that begin with SYS for system variables.
If it is necessary to specify these words as names, surround the reserved word with apostrophes. For
more information, see Expression Delimiters (on page 510).
Control-M/Analyzer reserved words are listed below. Words marked with an asterisk have been reserved
by Control-M/Analyzer for future use.
Table 311 Control-M/Analyzer Reserved Words
673
Control-M/Analyzer User Guide
674
14
14
C Calling Control-M/Analyzer User Routines
User routines can be written to supplement the functions of Control-M/Analyzer. When user routines are
called (by a DO CALLUSER statement), these routines typically receive variables from Control-M/Analyzer
as arguments. For more information, see DO CALLUSER: Automated Balancing Statement (on page 371).
These variables can be modified by the user routine and then passed back to the Control-M/Analyzer rule.
This appendix provides technical information that describes how user routines are called.
675
Control-M/Analyzer User Guide
Register Usage
Linkage follows standard IBM conventions.
Input Registers
Table 312 Control-M/Analyzer Input Registers
Register Purpose
Output Registers
Table 313 Control-M/Analyzer Output Registers
Register Purpose
15 Contains the user routine return code. This code should be placed in
Register 15 before the user routine terminates.
676
Control-M/Analyzer User Guide
Argument Pointers
Upon entry to the user routine, Register 1 points to the list of arguments passed through the DO
CALLUSER statement. The pointer in Register 1 accesses the argument values as diagrammed below:
Table 314 Argument Pointer in Register 1
Register 1
Pointer to address of Argument Address
Argument Address List Þ List Argument Variables
Register 1 points to a list of addresses. The first of these addresses points to a list of argument
addresses. Each argument address in this list points to the physical location of the data (variables).
Each variable is 101 bytes in length. The first byte contains the length of the variable. The remaining 100
bytes contain the value of the variable.
The user may change the variable value. If (as a result of changing the variable value) the length is
changed, the user is responsible for updating the length information in the first byte of the variable.
A sample member, CTBCALLU, is provided in the IOA.SAMPLE library.
677
15
15
D Euro Support
Control-M/Analyzer Euro support enables Control-M/Analyzer rules to validate data before and after
implementing Euro currency conversion in data and application software. The user can easily compare an
original file or report, to a target file or report produced by a new or changed program. A report is
produced that highlights differences while ignoring Euro currency-specific changes produced by the new
or changed program.
For example, Euro support enables the user to easily compare two data sets without needing to process
them sequentially even if only one data set contains Euro currency values. Euro support contains
intelligent compare functionality that is critical during the testing and automated QA processing of Euro
currency conversions.
Method of Operation
Control-M/Analyzer reads currency exchange rates to convert monetary values from one currency to
another. These exchange rates, that are entered by the user using an external AutoEdit currency rates
member, can be updated without changing Control-M/Analyzer rules. The values to be converted can
reside in any data set, report, or local variable file that Control-M/Analyzer can access.
The ON COMPARE block or MSUBSTMASK function can be used to convert currency values from one
currency to another using the AutoEdit currency rates member. The user can specify SUBSTFROM and
SUBSTTO substitution masks for the ON COMPARE block or MSUBSTMASK function. In the SUBSTTO
mask, the user can describe a record layout with currency masks for numeric values that usually
represent currency amounts in the file or report.
When Control-M/Analyzer matches a numeric value to a validation mask, which is described in Validation
Mask (on page 681), it calculates a local currency value for that item based on the specified currency for
the data.
When Control-M/Analyzer receives a format mask, which is described in Format Mask (on page 682), it
converts the source currency value into the required currency using the appropriate AutoEdit currency
exchange rate, and formats the target currency value to match the specified mask.
678
Control-M/Analyzer User Guide
Mandatory. Local currency used at the site. The local currency is specified by selecting a three letter
variable from the variables listed in the member. For example, %%LOCAL_CURRENCY=DLR
%%ROUND_CURRENCY=[YES | NO]
Mandatory. What to do when one or more digits after the decimal point cannot fit into the space allowed
by the format mask. These digits can be truncated or rounded to the right-most digit that fits in the mask.
For example, %%ROUND_CURRENCY=NO
Examples
Figure 409 Example of Use of AutoEdit for Currency Conversion
Format Item Price %%ROUND_ Formatted
Mask to Format CURRENCY Price
------ ---------- -------- ---------
###.## 123.121 NO 123.12
###.## 123.234 NO 123.23
###.## 123.645 NO 123.64
###.## 123.858 NO 123.85
###.## 123.121 YES 123.12
###.## 123.234 YES 123.23
###.## 123.645 YES 123.65
###.## 123.858 YES 123.86
%%xxx=value
%%yyy=value
679
Control-M/Analyzer User Guide
These 3-letter variables specify the currencies to be used for conversions and their conversion rates in
terms of the local currency. One or more variables of this type can be specified in the member. The
names of these variables are determined by the user and should match the variable names used in
applicable Control-M/Analyzer rules. For example, the PROD.LIB.AUTOEDIT(CURRATES) member may
contain the following specification:
%%LOCAL_CURRENCY=DLR
%%ROUND_CURRENCY=NO
%%DLR=1
%%EUR=1.106
%%PND=1.629
%%MRK=0.5618
In this example, the local currency is the US Dollar. At the time of this specification, one US Dollar was
equivalent to 1.106 European Union Euro, 1.629 British Pound, and 0.5618 Deutsche Mark.
Currency Mask
A currency mask can be used for currency specification in string substitutions for the ON COMPARE
statement or the MSUBSTMASK function. The currency mask must be matched to validate and format a
value specified in a specific currency on the file or report. The output of a currency mask is a value in the
numeric format that is enclosed within the innermost parentheses of the mask. This value is computed in
the currency specified to the left of these parentheses.
A currency mask is specified as a substring of the SUBSTTO string in the ON COMPARE statement or
MSUBSTMASK function, in the following format:
xxx=(validation mask | format mask[,%yyy=(format mask)])
In this format
xxx – 3-character currency identifier variable, from the currencies defined in the currencies AutoEdit
member (see above). It specifies the source currency for conversion input.
yyy – 3-character currency identifier variable, from the currencies defined in the currencies AutoEdit
member (see above). It specifies the target currency for conversion output.
mask – validation or format pattern that the input must match, as follows:
• + – positive number sign for formatting
• - – negative number sign for formatting
• ? – any single digit (0-9) for validation
• # – any single digit (0-9) for formatting
• Z – any single digit (0-9) for formatting – replace leading zeros with blanks
• . – decimal point (SYSDECCHAR value dependent)
• , – thousands separator (SYSDECCHAR value dependent)
680
Control-M/Analyzer User Guide
Validation Mask
A validation mask indicates how to read the source currency value. A validation mask is composed only of
question marks (?) with one optional decimal point indicator (comma or dot, based on the SYSDECCHAR
value). The validation mask is used to match a value from a record or string to a formatted currency value
(see above).
Note: A validation mask cannot contain any of the following characters: + (plus), – (minus), Z (letter Z),
# (number sign), or a thousands separator.
The currency value that is to be matched by the validation mask can contain one optional + or – sign, one
optional decimal point indicator (comma or dot, based on the SYSDECCHAR value), and optional
thousands separators.
The examples in Figure 410 illustrate currency values and validation masks to read them.
Figure 410 Validation Masks to Read Currency Values
Validation Mask Currency Value Value Read As SYSDECCHAR
--------------- -------------- ------------- ----------
??????.?? " 1102.31" 1102.31 DOT
" -102.31" -102.31 DOT
" 20.0 " 20.0 DOT
" - 3.92" -3.92 DOT
" 3.9-" -3.9 DOT
" .48" 0.48 DOT
"12,304.99" 12304.99 DOT
" +1102.31" 1102.31 DOT
" 1102.3-" -1102.3 DOT
681
Control-M/Analyzer User Guide
Format Mask
A format mask indicates how to format the target currency value. A format mask is composed of the
following characters:
An optional + (plus sign) or – (minus sign)
At least one Z (letter Z) or # (number sign)
One optional decimal point indicator (comma or dot, based on SYSDECCHAR value)
A format mask is used to format the value matched by the validation mask into a specific numeric pattern.
The format examples in Table 315 have the following defaults:
SYSDECCHAR=DOT
%%ROUND_CURRENCY=YES
102.319 102.32 102.32 102.32 102.32 +102.32 102.32 102.32 102.32+ +102.32
20.0 020.00 20.00 20.00 020.00 +20.00 020.00 20.00 020.00+ +20.00
20.03 020.03 20.03 20.03 020.03 +20.03 020.03 20.03 020.03+ +20.03
.03 000.03 .03 .03 000.03 +.03 000.03 .03 000.03+ +.03
3.9+ 003.90 3.90 3.90 003.90 +3.90 003.90 3.90 003.90+ +3.90
3.9- -03.90 -3.90 -3.90 -003.90 -3.90 003.90- 3.90- 003.90- -3.90
3.0- -03.00 -3.00 -3.00 -003.00 -3.00 003.00- 3.00- 003.00- -3.00
.484 000.48 .48 .48 000.48 +.48 000.48 .48 000.48+ +.48
9999.999 ****** ****** 9,999.99 ******* ******* ******* ******* ******* *******
-999.999 ****** ****** ******** ******* ******* ******* ******* ******* *******
Note: If the value of SYSDECCHAR is COMMA, the decimal point indicator is a comma and the thousands
separator is a period.
If overflow of significant digits occurs during formatting, the formatted value will consist entirely of
asterisks.
If one or more blanks occur between a plus or minus sign on the left and a number on the right, the sign
is shifted to the right until it is adjacent to the number.
682
Control-M/Analyzer User Guide
In this syntax, xxx is the source currency and yyy is the target currency for the conversion.
683
Control-M/Analyzer User Guide
Input Data
Table 316 Euro Validation Rule Example – Before
DD BEFORE DD Statement
GLOBAL BANK INC.
PAGE: 1
*******************************
C U S T O M E R L I S T I N G
*******************************
684
Control-M/Analyzer User Guide
Testing Rule
Figure 411 Testing Euro Validation Rule Example
EXECUTE 'INIT'
ON_DATA
ALWAYS
DO GETMEM MEMSYM 'EURO01' LIBSYM 'N14.LIB.AUTOEDIT'
DO PRINT DATA 'LOCAL CURR=%%LOCAL_CURRENCY'
DO PRINT DATA 'ROUND CURR=%%ROUND_CURRENCY'
DO PRINT DATA 'EUR=%%EUR DLR=%%DLR'
EXECUTE 'RECONCIL'
ON_COMPARE
SOURCE1
DD 'DDBEFORE' PROCESS USERBLOCK 'SUBSDATE'
SOURCE2
DD 'DD#AFTER'
ON_PARM MODE DS LINECT 80
WHEN FLINE 1 TLINE 80 FCOL 1 TCOL 80 SEARCH '.AL.'
DO EXTRACT 'LINE' LEVEL 0 LINE +0 FCOL 1 TCOL 80
DO SET 'DIFFLINE' EVAL 'SYSCURLINE'
DO SET 'LINETYPE' EVAL 'SUBSTR(1,1,LINE)'
DO PRINT DATA '-%%LINETYPE- %%DIFFLINE'
EXECUTE 'END'
ON_DATA
ALWAYS
DO TERMINATE RESULT OK USER_CODE 00
EXECUTE 'SUBSDATE'
ON_DATA
ALWAYS
DO SET 'RC' EVAL 'MSUBSTMASK(''DDSUBST'',SYSCURLINE)'
AutoEdit Member
%%LOCAL_CURRENCY=DLR
%%ROUND_CURRENCY=NO
%%DLR=1
%%EUR=1.106
685
Control-M/Analyzer User Guide
Output Data
LOCAL CURR=DLR
EUR=1.106 DLR=1
-R-
-D- 02/04/1999 3000.00 3472.88 472.88 2712.47
-I- 02/04/1999 3000.00 3472.88 472.88 1.00
686
16
16
E TRACE Facility
Control-M/Analyzer supports the execution of the TRACE facility, to examine the Control-M/Analyzer
commands while a rule is executing and after its termination. When a trace run is requested, and during
rule execution, the Control-M/Analyzer commands of the rule being executed are printed by block.
This appendix provides technical information that describes how trace runs are activated, provides an
example describing the operation of the TRACE facility on a sample rule, and describes the output
produced by the TRACE facility. For additional information and complete documentation of the IOA TRACE
facility and the trace level list, see the INCONTROL for z/OS Administrator Guide.
687
Control-M/Analyzer User Guide
When the rule is run, its output, as shown in DATRACE sysout, is that illustrated in Figure 413.
Figure 413 Output of Rule to Which TRACE Facility Was Applied
********************************* TOP OF DATA *******************
CTBTRC : ** ENTERING BLOCK: INIT OF TYPE DATA
CTBTRC : ON DATA
CTBTRC : IF
CTBTRC : DO GOTO
CTBTRC : DO SET
CTBTRC : DO PRINT
******************************** BOTTOM OF DATA ******************
688
17
17
F Single Startup API
The Single Startup Application Programming Interface (API) enables a user program to make multiple
calls to a Control-M/Analyzer rule after performing a single startup of the Control-M/Analyzer Runtime
environment.
The Control-M/Analyzer Runtime environment can be invoked by a call from a user program. Further
details can be found in the Control-M/Analyzer User Guide. When not using the Single Startup API, each
invocation of a Control-M/Analyzer rule from a user program normally causes the following actions:
1. Load SAS/C modules, Control-M/Analyzer modules and the invoked rule.
2. Initiate the Control-M/Analyzer Runtime environment and the invoked rule.
3. Compile the invoked rule.
4. Execute the invoked rule.
5. Delete loaded modules from memory.
6. Terminate the invoked rule and the Control-M/Analyzer Runtime environment.
When using the Single Startup API, the startup and termination phases are performed only once. For
example, a program that sends each record of a file to a Control-M/Analyzer validation rule in a loop does
not perform Steps 1, 2, 3, 5 and 6 (above) for each rule invocation. Instead, Steps 1, 2 and 3 are
performed only on first invocation and Steps 5 and 6 are performed only on the last invocation.
Call Effect
689
Control-M/Analyzer User Guide
Call Type From assembler user program From COBOL user program
2. Create a Control-M/Analyzer rule named "TSTCHECK", to perform all necessary checks for the lines
read by the user program. An example of this rule is provided below.
API Documentation
The Single Startup API interface has the components described in Table 320
Table 320 Components of the Single Startup API Interface
Name Description
CTBSSSM Interface rule between Control-M/Analyzer and the user check rule
TSTCHECK Rule that does the user validation checks and actions
The USER PROGRAM module and TSTCHECK rule must be provided by the user. All other components are
supplied with the Single Startup API and should not be changed.
690
Control-M/Analyzer User Guide
Execution Logic
The diagram below illustrates the sequence of invoked actions:
Figure 414 Sequence of Invoked Actions
USER PROGRAM issues a call to the CTBSSCL module with OPTION=INIT. The CTBSSCL module performs
the initial settings, suspends execution of the USER PROGRAM, and attaches Control-M/Analyzer as a
subtask.
Control-M/Analyzer is started and the CTBSSSM rule is called. This rule initializes the interface and should
not be changed. The CTBSSSM rule is executed up to (but not including) the statement GET: CALL
CTBSSGET (…….). The Control-M/Analyzer subtask is suspended and the USER PROGRAM resumes
execution.
Each time USER PROGRAM gets a record, it calls the CTBSSCL module with OPTION=CHECK. The USER
PROGRAM task is moved into wait state and the Control-M/Analyzer subtask continues execution using
the record that was received from the USER PROGRAM. The CTBSSGET routine retrieves the contents of
the record that was passed as a parameter, stores the contents of the record in corresponding
Control-M/Analyzer variables, and calls the TSTCHECK rule, passing to it the arguments LINE, LINEID and
TOLER.
691
Control-M/Analyzer User Guide
The TSTCHECK rule is loaded and compiled only once during the session. Each subsequent call simply
passes new parameter values to it. The TSTCHECK rule performs the required checks and returns the
LINE and TOLER parameters to the USER PROGRAM. (These parameters can be changed by the rule.)
The Control-M/Analyzer subtask is suspended and the USER PROGRAM gets the next record.
After the last record has been checked, USER PROGRAM calls the CTBSSCL module with OPTION=KILL.
The CTBSSCL module detaches Control-M/Analyzer and USER PROGRAM ends execution.
Examples
Assembler
The CTBSSM program, a sample assembler program, illustrates how to call a Control-M/Analyzer rule from
a user program using the Single Startup API. This program is a member in the IOA SAMPLE library.
The program reads an input file using DD-USERIN, passes each record to Control-M/Analyzer that in turn
executes the TSTCHECK rule to validate the record. As a result, the TSTCHECK rule returns TOLER (return
code) that is being printed in the main cycle of the program illustrated in Figure 415.
692
Control-M/Analyzer User Guide
693
Control-M/Analyzer User Guide
*******************************************************************
LINEID DC F'1'
TOLER DS F
*
OPTINIT DC CL8'INIT'
OPTCHECK DC CL8'CHECK'
OPTKILL DC CL8'KILL'
RULE DC CL8'CTBSSSM'
MISSION DC CL8' '
GRP DC CL8'TSTGROUP'
RULENAME DC CL8'TSTCHECK'
*
PTOLER DC C'TOLER = '
RCWORD DS CL8
DC CL132' '
WORD16 DS CL16
DWORD DS D
LTORG
END
The TSTCHECK rule receives the parameters RARG01 – RARG03 from Control-M/Analyzer.
The RARG01 parameter contains the record to be checked. The RARG02 parameter points to the LINEID
(record logical sequence number). The RARG03 parameter refers to TOLER (return code). The values
RARG01 and RARG03 can be changed by TSTCHECK and their updated values are passed to the USER
PROGRAM. Changes in the RARG02 parameter are not returned to the USER PROGRAM.
Input for the USERMAIN Assembler program (sample user program CTBSSM) is illustrated in Figure 417.
Note: This is sample code for documentation only. Please refer to the IOA SAMPLE(CTBSSSM) for the
complete source code to be used.
694
Control-M/Analyzer User Guide
695
Control-M/Analyzer User Guide
COBOL
The example in Figure 420 shows how to use the same interface with a COBOL user program.
Figure 420 Example - COBOL
. . . . . . . . . . . . . . . . .
WORKING-STORAGE SECTION.
. . . . . . . . . . . . . . . . .
01 INIT PIC X(8) VALUE 'INIT'.
01 CHECK PIC X(8) VALUE 'CHECK'.
01 KILL PIC X(8) VALUE 'KILL'.
01 RULE PIC X(8) VALUE 'CTBSSSM'.
01 MISSION PIC X(8) VALUE ' '.
01 GRP PIC X(8) VALUE 'TSTGROUP'.
01 RULENAME PIC X(8) VALUE 'TSTCHECK'.
01 LINEST.
05 LINEL PIC 999 USAGE BINARY.
05 LINE1 PIC X(100).
01 LINEID PIC S9(6) USAGE BINARY.
01 TOLER PIC S9(6) USAGE BINARY.
. . . . . . . . . . . . . . . . . . . . . . . .
PROCEDURE DIVISION.
. . . . . . . . . . . . . . . . . . . . . . . . . . .
CALL 'CTBSSCL' USING INIT, RULE, MISSION, GRP, RULENAME.
. . . . . . . . . . . . . . . . . . . . . . . . . . .
CALL 'CTBSSCL' USING CHECK, LINEST, LINEID, TOLER.
. . . . . . . . . . . . . . . . . . . . . . . . . . .
CALL 'CTBSSCL' USING KILL.
696