Search notes:
SAS: Program compilation - macro processor
The macro processor stores text in two locations:
When a
macro is compiled (
%macro m_foo; …. %mend m_foo;
), the macro processor stores the corresponding text in the
macro catalog.
When the macro later is executed, the macro processor fetches the text from the
macro catalog.
When a value is assigned to a
macro variable (
%let foo=42;
), the macro processor stores the value in the macro symbol table.
When later the macro variable is resolved (&foo
), the macro processor fetches the value from the macro symbol table.
Depending on the instructions of a macro, the macro processor pushes text onto the
input stack.
Compling a macro
When the macro processor(?) compiles a macro, it does not resolve macro variables or execute macro calles within the compiled macro code.