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.
Table 275 Control-M/Analyzer Commands
Command |
Syntax |
Description |
Options |
---|---|---|---|
ALWAYS |
[LABEL name] ALWAYS Example LABEL 'MUST' |
Unconditionally performs a processing unit (only for ON_DATA). |
|
DO ADDSYM |
DO ADDSYM Example DO ADDSYM VAR 'NEW_AE_VAR' MEMSYM '$AESYMS' |
Adds a variable to a new AutoEdit member or to an existing AutoEdit member read by command DO GETMEM. |
|
DO BLOCK |
DO BLOCK name Example DO BLOCK 'CHECK' ARG 'SUM,AVG,COUNTER' |
Processes a different EXECUTE block (of the same rule) and optionally passes input and output arguments. An argument is referenced in the called block by the BARG## variable, where ## is the two digit number indicating the position of the argument when passed (for example, BARG01, BARG02, BARG03 ... ). |
|
DO CALLUSER |
DO CALLUSER name Example DO CALLUSER 'M18ROUT' ARG 'SUM,AVG,COUNTER' |
Executes a user routine. |
|
DO COMMIT |
DO COMMIT Examples DO COMMIT VAR 'DB_FOREIGN.TOTAL' NOW DO COMMIT NONE DO COMMIT VAR 'DB_FOREIGN.AVERAGE' EXCLUDE |
Writes Control-M/Analyzer Database variables to the Database. If DO COMMIT is not specified in the rule, Database variables set during rule execution are committed at rule termination. Options can be specified to determine which variables are committed, and when. |
methods: |
DO COND |
DO COND condition Example DO COND 'JOB_%%SYSJOBNAME_OK' ODATE '0305' ADD |
Adds or deletes a prerequisite condition to or from the IOA Conditions file. |
opt: |
DO EXIT |
DO EXIT |
Immediately terminates the current block. Control passes to the statement that called the block if there is one. |
|
DO EXTRACT |
DO EXTRACT variable Examples DO EXTRACT 'CURRENT' LEVEL 0 LINE +0 FCOL +10 TCOL +15 DO EXTRACT 'VEC%%I' LEVEL 0 LINE +0 FCOL +10 TCOL +15 DO EXTRACT 'AVG' LEVEL 0 LINE +0 FCOL +10 TCOL +15 TYPE AV DO EXTRACT 'SUM' LEVEL 0 LINE +0 FCOL +10 TCOL +15 TYPE SU |
Extracts data from a data source and stores the data in a Control-M/Analyzer variable. The extraction is relative to the WHEN command of the specified LEVEL. This command cannot be used in EXECUTE blocks that contain an ON_DATA command. |
type: |
DO GETMEM |
DO GETMEM Example DO GETMEM MEMSYM ‘$AESYMS’ LIBSYM ‘M18.AE.LIB’ |
Retrieves an AutoEdit member and makes its AutoEdit symbols available to the rule. |
|
DO GOTO |
DO GOTO Example DO GOTO 'CHECK' |
Directs processing to statements in the current block identified by label name. |
|
DO PRINT |
DO PRINT Example DO PRINT DATA 'THIS DATA WILL BE PRINTED IN THE BANKING REPORT' |
Prints a data string to the Control-M/Analyzer Rule Activity report and to user files defined with the Dynamic Print facility. |
|
DO PUTMEM |
DO PUTMEM Example DO PUTMEM MEMSYM '$AESYMS' LIBSYM 'M18.AE.LIB' |
Writes an AutoEdit member and its variables to the specified library. |
|
DO REMARK |
DO REMARK Example DO REMARK DATA 'THE DAILY SUM IS %%SUM' |
Adds a user-defined remark about the Control-M/Analyzer invocation to the Rule Activity report and the Rule Activity display. |
|
DO RULE |
DO RULE name Example DO RULE 'MYRULE' ARG 'SUM,AVG,COUNTER' |
Executes a different rule, and optionally passes input and output arguments to the rule. An argument is referenced in the called block by the RARG## variable, where ## is the two digit number indicating the position of the argument when passed (for example, RARG01, RARG02, RARG03 ...). |
|
DO SET |
DO SET variable Examples DO SET 'I' EVAL '3' |
Initializes or modifies a Database, AutoEdit, or Local variable. |
|
DO SHOUT |
DO SHOUT Examples DO SHOUT MSG 'RULE RULFILE INITIALIZED' URGENCY 'R' DEST 'TSO-M18' DO SHOUT MSG 'MESSAGE TO OPERATOR' URGENCY 'R' DEST 'OPER' |
Issues a message to a TSO user, the operator console, or the IOA Log file. |
|
DO SYSOUT |
DO SYSOUT Example DO SYSOUT OPT C PRM B FRM X |
Specifies how a job output should be handled. |
|
DO TERMINATE |
DO TERMINATE Examples DO TERMINATE RESULT OK DO TERMINATE RESULT NOTOK USER_CODE 2222 |
Ends rule execution, specifying a result and a user return code or abend code. |
result: |
EXECUTE |
EXECUTE block name Example EXECUTE 'INPUT' UPON 'SYSJOBNAME NE M18CHKA' |
Names the current EXECUTE block and specifies any UPON criteria required for its execution. This command must always be followed by command ON_. |
|
HEADER |
HEADER Example HEADER OWNER 'M18' CREATOR 'M18B' |
Specifies basic information that describes the rule. |
|
IF |
[LABEL name] Example IF 'SUM GT 1000000' |
Conditionally performs a processing unit based on Boolean logic (only for ON_DATA). |
|
ON_CLASS |
ON_CLASS Example ON_CLASS CLASS 'X' DEST 'U2098' FORM 'STD' EXTWRT 'SYS01' |
Examines sysouts created by the current job, in a specified class, and (optionally) for a specified EXTWTR, DEST and FORM. |
MODE: DATA |
ON_DATA |
ON_DATA Example ON_DATA |
Examines Control-M/Analyzer variables. |
|
ON_DB2 |
ON_DB2 Example ON_DB2 SUBSYSYEM_ID ’X’ SQL_SELECT ’EMPNAME, EMPSALFROM EMPTABLE WHEN EMPSAL>30000’ MODE PG LINECT 60 |
Indicates that the data to examine is from a DB2 table. The dynamic SQL facility is used to examine this data. |
MODE DATA |
ON_DD |
ON_DD Example ON_DD DD 'MYDD' ON_PARM MODE PG LINECT 60 |
Examines a file referenced by a specified DD statement of the current step. |
MODE DATA |
ON_DSN (For Control-D users only) |
ON_DSN Example ON_DSN 'LAST=YES,JOBNAME=M33CDMZ,DDNAME=$JES2LOG, |
Examines a specified CDAM file. See CDAM in the Control-D User Guide. |
MODE: DATA |
ON_FILE |
ON_FILE Example ON_FILE 'M18.SEQ.TEST' ON_PARM MODE PG |
Examines a specified sequential file. |
MODE: DATA |
ON_PAGE (For Control-D users only) |
ON_PAGE Example ON_PAGE ON_PARM MODE PG LINECT 60 |
Examines CDAM pages that have satisfied Control-D WHEN criteria. |
MODE: DATASTAMP: |
ON_ |
ON_SYSDATA Example ON_SYSDATA ON_PARM MODE PG LINECT 60 |
Examines Control-M SYSDATA job sysouts archived by Control-M/Restart. |
MODE: DATASTAMP: |
ON_SYSOUT |
ON_SYSOUT Example ON_SYSOUT DD 'SYSUT2' PROC 'STEP00' |
Examines a specified sysout previously created by a step in the specified job. If a job name is not specified, JOBNM defaults to the current job. |
MODE: DATA |
ON_VSAM |
ON_VSAM Example ON_VSAM FILENAME 'ACTG_INP' T 'RRDS' |
Examines a KSDS, RRDS or ESDS type VSAM file. Key can be specified for KSDS files. rba can be specified for RRDS and ESDS files. |
|
WHEN |
WHEN Examples WHEN FLINE 6 TLINE 7 FCOL 1 TCOL 100 |
Information required to conduct a string search on data (except for ON_DATA). |
prefix: |
Parent Topic |