 Hi everyone! It's Monica Wahee here, author of the popular book Mastering SAS Programming for Data Warehousing. If you are doing data warehousing in SAS, you are probably doing a lot of ETL automation using macro programming. Today, I want to share with you a few useful SAS white papers that can guide you in applying macros to your SAS data warehouse. Links to all these white papers are in the video description. The first white paper I want to highlight is SAS Macro Programming for Beginners by Susan Slaughter and Laura DelWitchie. This is a main go-to paper I use for beginners when teaching and learning about SAS macros in general. The paper covers very basic stuff about macros, the difference between macros and macro variables, how you need to use a process for building macros, and how you have to think about ordering your commands in macros. What I like about this paper is that it starts you off very simple and teaches you how to build your macros step-by-step. So that one will get you started. Now remember, macros were designed a long time ago in SAS. Also, let me remind you that we use macros a lot in data steps, and code in SAS, especially data steps, has to be super efficient or it won't run. And that is true in general of macro commands. So what I like about this next white paper, Don't Be a SAS Dinosaur by Warren Repoll Jr., is that it goes back in time and shows us different ways to do code in SAS to improve its efficiency. See, here it is. Now, Warren is talking about modernizing programs with base SAS 9.2 enhancements. And so he is covering some functions that were new to SAS at the time, but we can still use today. It can be very instructive. For example, here he shows you what happens when you use the blank line option in PROC PRINT. So that way you can figure out, why did they even build the option blank line in PROC PRINT? He has other examples like that throughout the white paper. It's a good way to really understand what some of the SAS code does. So what's great about that one is that it shows you side by side examples of code, and especially the kind of code you can use to improve efficiency in SAS. Okay, now here's our next one. Using SAS macro language and SAS pipe to process data by Chin and Bailey. So if you are moving big health data sets around like these people are at the CDC in Atlanta, you are often moving from environment to environment. So we are not just talking about internal data steps here. We are talking about piping data from system to system. See this diagram? They explain it better than I can with this diagram. Now, see below? They show the macro they are using. So in that one, they are showing you how to run macros across pipes and move data around from environment to environment. Okay, this next one is kind of fun and also generally useful outside of just dealing with macros. It's called logging the log magic, pulling a rabbit out of the hat by Adele Fommi. I'm not really sure what he means by the rabbit, but I love animals, so I think it's a great name for the white paper. But what he is really talking about is using programming to make certain things show up in the SAS log to help you troubleshoot. He starts by talking about ways to manicure your log file and get it to print a certain way. Then he goes on to talk about ways to get certain different things to show up and print out in the log. He even provides examples of macros he uses to get things to print in the log. So I bring this topic of the log file up with macros because when you run data steps, you see a bunch of different stuff automatically show up in the log file. But if you turn that data step into a macro, you won't see any of that print to the log. So you have to bend over backwards to request certain things to print in the log for troubleshooting. That's why that white paper I just showed you can help you when you are programming macros. Okay, here's my last white paper and I admit I don't do much with macros anymore, so I haven't tried this technique. The paper is called the SAS autos companion and it's about reusing macros. Now don't get me wrong, I definitely reuse macros. I just tend to do it with the include statement as I demonstrate in my videos and talk about it in my book. This white paper does cover using the include statement, but it also covers using other methods of reusing macros, including using the SAS autos feature, which I don't know how to do. It's best if you try these things in a real data warehouse environment, which I don't have right now. But if you are at a SAS data warehouse and you want to do more with reusing macros, I encourage you to experiment with the SAS autos and see if you can improve the efficiency of your operation. So in conclusion, these are my recommended SAS white papers if you are trying to get going with macros and SAS, especially with respect to applying them to your data warehouse. Hey, do you have any favorite SAS white papers? Share them with us. Please comment and link to them in the description. Tell us why you like them and what we should look for when we read them. Isn't it great to get together with other SAS fans? Thanks for watching this video and I hope you have a groovy day.