Purpose
Copies stored code and modifies inline and copied code.
Syntax
Col 1 ▼ ►►─── =MACRO ─┬─ member-name ─────────────────┬─┬────────────────────────┬────► ├─ 'module-name' ─┬───────────┬─┤ │ ┌────────────┐ │ │ └─ version ─┘ │ └─ ( ─▼─ argument ─┴─ ) ─┘ └─ * ───────────────────────────┘ ►─── =drop-clause ───────────────────────────────────────────────────────────► ►─── =change-clause ─────────────────────────────────────────────────────────► ►─── =MEND ──────────────────────────────────────────────────────────────────►◄
Syntax Rules
Identifies the =MACRO parameter. It is coded starting in column 1 and is followed by one or more spaces.
Identifies the source of code to be modified. library
The member name by which the stored code is accessed, as follows:
Parameters must be stored in a library prior to run time and made available to the precompile phase of CA Culprit processing. The code must be stored with a record length of 80 bytes.
If the PARMLIB= option is coded on a PROFILE parameter that appears before the USE parameter, the parameters are copied from the library specified on the PARMLIB= option. Otherwise, the parameters are copied from the library selected as the default for PARMLIB at installation.
Note: For more information on system defaults, see the CA IDMS Installation Guide for your operating system.
(IDD users only) Specifies a 1- to 32-character alphanumeric expression, enclosed in single quotation marks that identifies the module containing stored code.
Specifies the version number of the module. If no value is specified, CA Culprit uses the highest version number known to the data dictionary for module-name.
Indicates that parameters placed directly in the input parameter stream are to be modified. The =MACRO parameter applies to all parameters that immediately follow the =MEND parameter up to the next =COPY or =MACRO parameter, if any.
Specifies a single value or a list of values enclosed in parentheses; each value is a 1- to 53-character alphanumeric value that replaces a symbolic parameter in copied code. Up to 35 arguments can be specified.
The order of the listed arguments is important; the first argument is assigned to symbolic parameter &&1, the second to &&2, and so on. The sequence of symbolic parameters is &&1 through &&9 followed by &&A through &&Z. Symbolic parameters that appear in comments or in fixed-format portions of a parameter are not replaced. An =MACRO parameter that contains symbolic parameters is illustrated under examples.
If the value of the symbolic parameter is shorter or longer than the 3-character symbolic parameter, the length of the record is adjusted to accommodate the length of the substituted value. If the length of the record exceeds 72 characters, one or more continuation lines, to a maximum of 256 characters, are created to accommodate the data.
The following rules apply to coding a list of arguments on an =MACRO parameter:
Specifies an optional parameter associated with the =MACRO parameter. This parameter is discussed separately later in this chapter.
Specifies an optional parameter associated with the =MACRO parameter. This parameter is discussed separately later in this chapter.
Signals the end of an =MACRO parameter. Each =MACRO parameter must have a corresponding =MEND parameter. Any number of =DROP and =CHANGE clauses can be entered between an =MACRO and an =MEND parameter.
=MEND must be coded starting in column 1; no other information may appear on the same line. Parameters that are modified inline by an =MACRO * instruction must appear immediately after the =MEND parameter.
Usage
The following coding considerations apply to the =MACRO parameter:
Note: Within each =MACRO parameter (that is, =MACRO and any associated parameters), a maximum of 20 keyword expressions (that is, REC=, TYPE=, CNST=, OLD=, and NEW=) is permitted. Each occurrence of a keyword expression must appear entirely on one line.
=MACRO * * $THIS IS A COMMENT =DROP REC=TITLE =MEND
Example
The following is a sample =MACRO statement with symbolic parameters.
Five symbolic parameters (&&1 through &&5) appear in the CA Culprit parameters associated with the =MACRO parameter. The arguments corresponding to the symbolic parameters are listed in parentheses on the =MACRO parameter:
IN 80 REC EMP-NAME 1 25 'EMPLOYEE' 'NAME' REC EMP-LNAME 11 15 REC SALARY 70 10 3 DP=2 REC DEPARTMENT 30 20 'DEPARTMENT' =MACRO * (DEPARTMENT 'BRAIN STORMING ' EMP-NAME SALARY 60000) =MEND 01SORT DEPARTMENT,-,EMP-LNAME 013EMPLOYEE SALARIES 010COUNT 1 017010 &&1 NE &&2 DROP 017 &&4 GE &&5 DROP 017030 COUNT + 1 COUNT 0151*010 &&3 HR 0151*020 &&4 SZ=7 F2 HF 0161*010 'TOTAL COUNT' 0161*020 COUNT SZ=8
|
Copyright © 2014 CA.
All rights reserved.
|
|