All programs are built by creatively piecing together simpler parts into a larger whole. In SAS®, the SAS macro facility provides an ability to group and piece together analytic blocks. However, writing complex programs using the SAS macro facility can be difficult and cumbersome. An easier way is to combine two new functions, RUN_MACRO and DOSUBL, with DATA step code. RUN_MACRO and DOSUBL enable DATA step code to immediately execute a macro and act on the result, something that was not possible before SAS ® 9.2. This paper presents examples of using these two new functions from DATA step to code programs that are easier to read, write, and maintain
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.