Strengthen your programming skills with tips and techniques from the experts
How to write a SAS macro program to repeat your SAS processing for each value of a BY grouping variable.
Strengthen your programming skills with tips and techniques from the experts
How to write a SAS macro program to repeat your SAS processing for each value of a BY grouping variable.
When you are constantly taking the data tables and completing joins to begin working on your reports or analysis it might be time to consider creating permanent views. Then you can just add the view to the Enterprise Guide project rather than dealing with the joins in a Query Builder
After unwittingly getting involved recently in a code vs GUI discussion another pro GUI vote came in yesterday when presenting to a customer's internal user group. When creating and using prompts in SAS Enterprise Guide, it is a no-brainer to recommend leveraging the %_eg_WhereParam as it handles all the special
During IFSUG yesterday, Sunil Gupta gave attendees to his presentation a special homework assignment. Look into the SAS Enterprise Guide task 'Characterize Data'. Sunil suggested that this was a simple approach to quickly getting a summary of all the variables within your data table. Of course, some programmers will use
Today at IFSUG, Chuck Patridge presented a wonderful talk about how to complete fuzzy matching using BASE SAS tools. Chuck has been programming SAS since 1979 and has been tasked multiple times with coming up with in-house solutions to address business needs without the software costs that are typically associated
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
This question came up while helping my presales colleague with a client’s question: “Is Microsoft Excel in direct competition with SAS?” Not really. I like to think of SAS as partnering with Excel. Because of the following Excel benefits and its synergy with SAS. Excel has been around for years.
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
Unlike BASE SAS tables, OLAP cubes must exist in within the metadata in order to access from any of the OLAP Viewers. In addition to having some metadata OLAP cubes have a physical file structure presence (at least for MOLAP/HOLAP because it's a different story for ROLAP). When you refresh
I recently blogged about Mahalanobis distance and what it means geometrically. I also previously showed how Mahalanobis distance can be used to compute outliers in multivariate data. But how do you compute Mahalanobis distance in SAS? Computing Mahalanobis distance with built-in SAS procedures and functions There are several ways to
How we love shortcuts. Our life seems more efficient with them. I try to take the earlier train for a good parking spot that lets me exit early. Actually change that to any spot (my train station has tons of commuters with FEW parking spaces so getting up early is the
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
Unlike prior versions of SAS OLAP technology, 9.2 provides more options for maintaining and refreshing OLAP cubes. With this comes some discussion about what each one does alone, and how pairing these techniques really provides SAS OLAP Server Administrators and cube developers a cornucopia of OLAP options. PROC OLAPOPERATE Remember
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
So many of us struggle with this mountain. In fact, 68.27% of us get within sight of reaching the summit (while 95.47% of us are at least on a perceivable slope). We run, walk, crawl and sometimes slide our way uphill (from one direction or the other) until we finally
Note: as this is a popular topic, I've added a few notes with minor updates, including a link to a popular how-to tutorial video. In case you missed it, the first maintenance release for SAS 9.3 was recently released. Because we're all friends here, you may call it "SAS 9.3M1"
In the Star Wars movie, Obi-wan could just wave his hand, mutter a few words, and the stormtroopers would "move along". How the power of the Force makes ridding yourself of problematic characters so much easier! I recently was invited to become an alternate instructor for Ron Cody’s SAS Business
Before there was CNN or FOX News, people used to get their news from SAS. At least, that's how I imagine that people kept themselves informed. What else can explain the existence of the NEWS= system option, which helps SAS admins to surface the must-know information to the SAS community?
Dear Miss SAS Answers, In PROC REPORT can I use one calculated (computed) variable in the calculation of another computed variable? In the example below, I’m trying to use the value of the Bonus column to calculate the Total column: compute Bonus; Bonus =sal.sum*0.05; endcomp; compute Total; total=sum(sal.sum, Bonus.sum); endcomp;
In the immortal words of Britney Spears: Oops! I did it again. At least, I'm afraid that I did. I think I might have helped a SAS student with a homework assignment, or perhaps provided an answer in preparation for a SAS certification exam. Or maybe it was a legitimate
On the heels of the release of the popular SAS macro variable viewer from last month, I'm providing another custom task that I hope will prove just as useful. This one is a SAS options viewer, similar in concept to the OPTIONS window in SAS display manager. You can download
In one minute (and 10 seconds, but are you measuring that?) you can add a custom measure (also known as calculated members) to your OLAP cube. Watch this video to create a simple calculation multiplying units * price. Remember that this mechanism is not just used for multiplications, you can
“Do you really serve M&Ms every Wednesday? Tell us the story!” clamored a wide-eyed class after sampling the M&Ms lighting up the breakout area. Seeing how hard they worked on their exercises, it seemed ok to have a slight diversion from technology. Besides as you’ll find out, the story has
On this blog, I've delivered a few tips about using SAS formats to stratify your data values "in place" without having to actually change your data. The most recent example addressed date and datetime variables. My previous examples included simple SAS programs that you can run in SAS display manager
If you’ve taken one of my SAS classes you may recall “Mark’s 3 rules of programming”, the first of which is “Lazy programmers are GOOD programmers.” One of the things I love about best about SAS programming is the plethora of functions and shortcuts built into the language, all designed
Rick posted a tip today about using abbreviations in the SAS program editor window (often referred to as the "enhanced editor"). Defining abbreviations is a great way to save keystrokes and re-use "templates" of code that you've squirreled away. (One of Rick's readers also picked up on the tip, and
I've been working with date-time data on a recent project, and I've come across a few SAS programs that have "opportunity for improvement" when it comes time to create reports. (Or maybe I haven't, and I contrived this entire blog post so that I could reference one of my favorite
Drill-through to detail is the ability to right click within a cell of a web report or OLAP viewer and request the detail source records that make up that specific cell's measure. The maximum number of records, by default, is set to 300,000. Feasibly the report user could download all
In a production environment, where dozens of SAS programs are run in sequence, often monthly or quarterly, and where logs can span thousands of lines, it’s easy to overlook the small stuff that can cause data hangovers. Recognize any of these? A temporary data set finds its way into subsequent
This blog post is a "mashup" of a couple of my previous posts, combining the lessons to create something brand new that I hope you will find useful. First, let's review what we know: SAS Enterprise Guide supports a scriptable object model, which allows you to write scripts or programs