Macro variable references and
%LET statements are part of the macro language. The macro facility
includes a macro processor that is responsible for handling all macro
language elements. Certain token sequences, known as macro triggers,
alert the word scanner that the subsequent code should be sent to
the macro processor.
The word scanner recognizes
the following token sequences as macro triggers:
-
% followed
immediately by a name token (such as %let)
-
& followed
immediately by a name token (such as &amt).
When a macro trigger
is detected, the word scanner passes it to the macro processor for
evaluation. The macro processor
-
-
requests additional tokens as necessary
-
performs the action indicated.
For macro variables,
the processor does one of the following:
-
creates a macro variable in the
symbol table and assigns a value to the variable
-
changes the value of an existing
macro variable in the symbol table
-
looks up an existing macro variable
in the symbol table and returns the variable's value to the input
stack in place of the original reference.
The word scanner then
resumes processing tokens from the input stack.
Note: The word scanner does not recognize
macro triggers that are enclosed in single quotation marks. Remember
that if you need to reference a macro variable within a literal token,
such as the title text in a TITLE statement, you must enclose the
text string in double quotation marks or the macro variable reference
is not resolved.