In this chapter, we took our understanding of SAS and its functionalities a step forward by looking at macros. We learned how the macro processor works in conjunction with the word scanner to understand how to process macros. We looked at macro variables and writing macro definitions or programs. A few examples were presented to showcase how macros can help utilize automatic global variables, help write data-driven programs, and also evaluate arithmetic and logical operators. Toward the end of the chapter, we reviewed some macro coding best practices.
In the next chapter, we will continue to focus on macros and look at some advanced options for coding.