The rule specified in a DO CTBRULE statement is invoked by Control-D or Control-V
Note: When working with datasets without ASA codes, changing the Control-D ALLOCOPT parameter value affects whether a printing control character is inserted before column 1 in the decollated output. If ON PAGE is specified in a Control-M/Analyzer rule definition that is invoked by a DO CTBRULE statement in a Control-D or Control-V decollating mission, the Control-M/Analyzer WHEN and EXTRACT statements may receive files from Control-D or Control-V before the printing control character is added to the record.
To ensure that a report decollated by Control-D or Control-V is received by Control-M/Analyzer in the same format regardless of how Control-M/Analyzer is invoked, the ALLOCOPT parameter in Control-D or Control-V should not be specified. If the ALLOCOPT parameter is specified, this may require the Control-M/Analyzer WHEN and DO EXTRACT column ranges to be shifted when Control-M/Analyzer is invoked by a DO CTBRULE statement.
The SYSOPT System variable indicates the Control-M/Analyzer invocation method. When the Control-M/Analyzer Runtime Environment is invoked by Control-D or Control-V, the SYSOPT System variable automatically contains one of the values described in Table 300.
Table 300 SYSOPT Values when Control-D Invokes Control-M/Analyzer
Value |
Description |
---|---|
CTDFIRST |
First invocation of Control-D or Control-V (such as, before decollation begins). |
CTDWORK |
Invocation of Control-D or Control-V for each page received by Control-M/Analyzer. |
CTDLAST |
Last invocation of Control-D or Control-V (such as, after decollation ends). |
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.
The group name can be specified in the GROUP parameter of
If a group name is specified in both of these parameters, the rule is implemented with the group name specified in the Control-D or Control-V decollating mission.
Figure 381 Use of the GROUP Parameter
LIBRARY : CTB.PROD.RULES RULE : RULPAGM
COMMAND ===> SCROLL===> CRSR
+-----------------------------------------------------------------------------+
OWNER M18 GROUP CTB_DEMO
UPDATED 08/08/00 - 12:23:00 BY M18
DESC SAMPLE RULE UNDER CONTROL-D
OPTIONS
===========================================================================
EXECUTE I UPON SYSOPT EQ 'CTDFIRST' C
ON DATA
ALWAYS
DO SHOUT TO OPER URGENCY R
= CONTROL-M/ANALYZER STARTED UNDER CONTROL-D
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE PAG UPON SYSOPT EQ 'CTDWORK' C
ON PAGE
MODE PG LINECT DATASTAMP
WHEN LINE 001 - 060 COL 001 - 080 STOP AND/OR
STRING = .AL.
DO EXTRACT = VAR
LEVEL 0 LINE +000 COL 0001 - 0080 PROCESS TYP SU
DO
WHEN LINE - COL - STOP AND/OR
STRING =
DO
===========================================================================
EXECUTE E UPON SYSOPT EQ 'CTDLAST' C
ON DATA
ALWAYS
DO SET = DB_LAST_TOTAL=VAR C
DO SHOUT TO OPER URGENCY R
= CONTROL-M/ANALYZER TERMINATES UNDER CONTROL-D
DO
IF VAR GT DB_LAST_TOTAL@G0 C
DO REMARK = TOTAL IS REASONABLE
DO TERMINAT = OK COD 0000
DO
ELSE
DO REMARK = TOTAL IS UNREASONABLE
DO TERMINAT = NOTOK COD 0999
DO
(ENTER "ALWAYS", "IF")
===========================================================================
EXECUTE UPON C
ON
======= >>>>>>>>>>>>>>> END OF RULE DEFINITION PARAMETERS <<<<<<<<<<<<<<< =====
FILL IN RULE DEFINITION. 15.31.54
If DO TERMINAT is specified earlier than the CTDLAST (or CTVLAST) invocation, subsequent Control-M/Analyzer invocations are not performed.
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.
Parent Topic |