Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The following examples of the SAS macro facility illustrate some of the tasks that the macro processor can perform for you. There’s no need to understand the coding of these programs at this point (although the code is included and might be useful to you later). What you should gain from this section is an idea of the kinds of SAS programming tasks that can be delegated to the macro processor.
In addition to the examples that follow, Program 1.3 demonstrates reuse of the same program by simply changing the values of the macro variables at the beginning of the program. A new subset of data is analyzed each time the values of the macro variables are changed.