How does Macro language work and why.
It is a code generator!
1 Code substitution
2 Macro statements
3 Dynamic programming
Timing is key to understanding how MACROS work.
Run; or Quit; or new Step triggers timing boundaries
The scope and persistence of macros is complex but critical
They will have a Global table and may / may not have local symbol tables.
Use %Global and %Local to force the issue and avoid uncertainty.
Remember macro variables can exist in more than one symbol table with different values!