General Rules for Macros
A macro definition item must have the letter M as the first line of
the macro. This identifies the item as a macro.
A macro can contain complete English clauses. Do not split parts of a clause between macros.
If the clause is complex, it is advisable to enter each segment on a separate line.
The segments of a clause can be interspersed with comment lines. Comment lines must begin with an asterisk (*) followed by a blank space.
One USING clause can be entered per macro as described below.
All data definition items referenced by a macro must reside in the current dictionary or in the master dictionary.
Calls to one or more other macros in the current dictionary can be specified.
For a description of the various clauses, refer to The English Sentence. Examples of macros are provided in the section Macro Examples.
USING Clause
Any macro can contain one USING clause. The clause affects only its host macro or the macros called by the host macro.
If a called macro also contains a USING clause, that clause overrides any USING clause in the calling macro.
Call to Another Macro
A macro can call another macro. The number of macros that can be called for constructing an English sentence is only limited by the size of the workspace available.
Care must be taken that called macros do not result in an infinite loop. For example, macro A calls macro B; macro B calls macro C; and macro C calls macro A. This can cause the workspace to be filled, result in an abort, and cause the system to display an "Out of workspace" message.
Macro Names
The name assigned to a macro should reflect its content and purpose.
Caution
Reserved words, such as HEADING and FOOTING, must not be used for a macro name because they cannot be referenced as macros. They include English verbs, connectives, and modifiers. In addition, macros should not be given the name of any file defined in the MD.
For example, a macro set up to print labels can be named "LABELS". Macros containing headings can be named for the report, such as "INVOICE.HEAD".
Comment Lines
Comment lines can be embedded in a macro. Any line can be used for a comment except the first line.
The format for a comment line is an asterisk (*) in the first character position, a space, and then the text. For example, on line 002, enter:
* Heading for all financial reports.