Chapter 8
In SAS, a macro variable is a blank variable that can be established and set to a particular value. By contrast, a macro is a snippet of code that can be automatically launched to run. SAS macros commonly use macro variables, but macro variables can be used outside of macros.
The
NONOTES
,NOSTIMER
, andNOSOURCE
options suppress information from the log file.NOSYNTAXCHECK
prevents the automatic check of code syntax SAS does when code is run.The reason why SAS macro code is developed in a careful, step-by-step process is that it is very hard to troubleshoot errors that occur. By creating code that runs without any macro programming, and using a step-by-step method to convert it to a macro, you can cut down on time spent troubleshooting.
Conditions are added to macros to address anomalies in underlying coding. In our case, all of our variables except one were coded according to a system, and one was coded according to another system. The conditional programming...