The basic structure of an EXECUTE block is shown in Figure 5.
Figure 5 EXECUTE block basic structure
EXECUTE block name UPON execution criteria
ON data source
WHEN criteria
DO statement
DO statement
WHEN criteria
DO statement
DO statement
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.
Table 10 Structure of Sample Control-M/Analyzer Rule
BASIC RULE INFORMATION |
RULE: |
Payroll |
BR |
OWNER: |
M99 |
BR |
|
DESC: |
Compare the payroll totals of the current month to those of last month, making sure that a 10% deviation is not exceeded. |
BR |
|
EXECUTE BLOCK #1 |
EXECUTE: |
Get Totals |
DSa |
ON FILE: |
Payroll Reports |
DS |
|
WHEN ‘TOTAL:’ |
Search for "Total:" in a specified Line/Column Range |
DI |
|
DO EXTRACT |
Total from current Payroll Reports |
DOa |
|
EXECUTE BLOCK #2 |
EXECUTE: |
Compare |
DS |
ON DATA: |
Control-M/Analyzer Variables |
DI |
|
DETERMINE |
Percentage deviation between the current total and the previous one (obtained from the Control-M/Analyzer Database) |
DI |
|
IF |
Deviation is over 10% |
DI |
|
DO SHOUT |
Send message to an operator |
DO |
|
DO TERMINAT |
Terminate with user code of 0008 |
DO |
|
ELSE |
Deviation is 10% or less |
DI |
|
DO TERMINAT |
Do not send message |
DO |
Table 11 Data identification parameters
Abbreviation |
Explanation |
---|---|
BR |
Basic rule parameter |
DS |
Data selection statement |
DI |
Data identification statement |
DO |
DO statement |
Parent Topic |