| Bart Jablonski |
A macro variable array is a jargon term for a list of macro variables with a common prefix and numerical suffixes. Macro
arrays are valued by advanced SAS programmers and often used as ”driving” lists, allowing sequential metadata for
complex or iterative programs. Use of macro arrays requires advanced macro programming techniques based on indirect
reference (aka, using multiple ampersands &&), which may intimidate less experienced programmers.
The aim of the
paper is to introduce the macroArray SAS package. The package facilitates a solution that makes creation and work with
macro arrays much easier. It also provides a ”DATA-step-arrays-like” interface that allows use of macro arrays without
complications that arise from indirect referencing. Also, the concept of a macro dictionary is presented, and all concepts
are demonstrated through use cases and examples. |