This week, our focus was on building macros in SAS. I’m relatively familiar with building and structuring macros because of my prior experience with Excel VBA. Seeing how this same operation works in SAS was very enlightening – to me, it was very similar to building functions as opposed to building modules: building out the code first, and then wrapping the code in a macro and passing different variables through the variable fields specified. Building these macros into our assignment with several similar data sets to our first assignment drastically increase the efficiency and ease of summarizing various fields rather than manually building out new code for every new variable.
I think one of the core concepts here that pertains not just to building out code blocks, but especially formulating macros, is to get the code working first, because debugging macros (especially in SAS) is extremely difficult. Once the code is working appropriately, it’s easy to pass in the variables to automate your process. That’s probably the biggest take away from week 4’s lesson for me: build out small chunks of code first, get it working, then wrap it in a macro to automate it. As far as building macros in SAS, it’s my understanding that this skill set is not very prevalent in most industries, yet, it is very in demand as demonstrated by our last assignment which was to identify jobs in the market looking for SAS macro skills. I enjoyed learning the value of this skillset through this assignment and realized the tremendous value it can provide when used effectively.