Pathmaker Reference Manual

Macro Definition and Commands
Macro Language
3–14 067869 Tandem Computers Incorporated
Considerations
The INVOKE command must supply parameter values for all parameter names
declared by the PARAM command of the invoked macro.
Text resulting from expansion of the macro is inserted into the source file being
generated. If the macro contains no macro commands, the effect is the same as that of
a COPY operation.
Macro references can be deeply nested, limited only by memory constraints.
When a macro is invoked, the macro commands are interpreted according to the
context in effect at the time the macro reference is encountered during processing.
Examples
The following command implements the inclusion of working storage for a service.
Note that the quotes appearing in the command line will be part of the COBOL source
code that is generated from this macro.
% INVOKE “T9WS-$#SERVICE-NAMES$” IN
%“S#SERVICE-CUSTOM-SOURCE-FILE$”
The following example is for a macro named MACRO-1 that has a parameter called
ACTION.
%INVOKE “MACRO-1” (“MOVE LOW-VALUES TO $#REFERENCE-OBJECT$”)
If EMPLOYEE-DEF is the current reference object when the macro is invoked,
parameter ACTION in MACRO-1 will have the value “MOVE LOW-VALUES TO
EMPLOYEE-DEF.”