Earlier this week I described a common programming pattern in the SAS macro language. The pattern sets up a loop for processing each distinct value of a classification variable. The program uses the PROC SQL SELECT INTO feature to populate SAS macro variables. The effect: you can roll your own
Author
How to write a SAS macro program to repeat your SAS processing for each value of a BY grouping variable.
A well-formed WHERE statement or subsetting IF can narrow down the output of your SAS DATA step. The SAS log does a good job of telling you how many records were processed by the action. For example, let's look at this simple DATA step with my "poor man's random sample",
Did you oversleep this morning? If you live in the United States of America, Monday morning seems to have arrived just a bit earlier, accompanied by a bit more "dark" than usual. That's because as good time-fearing citizens, we have all set our clocks ahead by one hour so as
A few years ago I had the privilege of presenting the last technical paper at SAS Global Forum. This year, conference chair Andy Kuligowski asked me to go one better than that, and present a talk at the official Closing Session. What will I talk about? That's a mystery (maybe
The next time you write a DATA step, try to express it in iambic pentameter. Or instead of a SAS macro function, how about a SAS macro sonnet? (Or, for the more base among you, a limerick?) That's the spirit behind the code {poems} project. You write a poem in
About once a month, a customer approaches SAS and asks a question of significance. By "significance", I don't necessarily mean "of great importance", but instead I mean "of how SAS handles large numbers, or floating-point values with many significant digits". In response, we always first ask why they asked. This
Do you want your report to look good on the web, or to look good when you print it? Pick one. Before the SAS Report file format, that was the choice that you faced. HTML is perfect for the web browser. It's easy to scroll through tables, to apply an
I have a love-hate relationship with spreadsheet data. I am interested in finding data to analyze, and if it arrives in the form of a spreadsheet, I'll take it. And I like to deliver results and reports, but often my constituents ask for it as a spreadsheet that they can
We call it the "metadata profile", but really it's like a telephone number that connects you to your SAS environment. Just as a telephone number has component parts (country code, area code, exchange), the metadata profile contains information that allow you to "dial in" to your SAS servers. This information