SAS temporary arrays are an underutilized jewel in the SAS toolbox. I find that many beginning to intermediate SAS programmers are not familiar with temporary arrays. The good news is that there is nothing complicated about them and they are very useful. First of all, what is a temporary array?
Tag: SAS Programmers
The title of this post borrows from Stanley Kubrick’s 1964 comedy “Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb.” It stars the great Peter Sellers as the titular character as well as George C. Scott and Slim Pickens. The black and white film is strange
A multilabel format enables you to assign multiple labels to a value or a range of values. The capability to add multilabel formats was added to the FORMAT procedure in SAS® 8.2. You assign multiple labels by specifying the MULTILABEL option in the VALUE statement of PROC FORMAT. For example,
Imagine making $50K a day out of thin air. Did you know that NASDAQ routinely processes around 10,000,000 trades a day? What if instead of rounding cents for each transaction, market makers truncated fractions of cents in the amount they owe you? Under the assumption that each transaction, on average,
Using the DATASETS procedure, we can easily modify SAS variable attributes such as name, format, informat and label: proc datasets library=libref; modify table_name; format var_name date9.; informat var_name mmddyy10.; label var_name = 'New label'; rename var_name = var_new_name; quit; We cannot, however, modify fixed variable attributes such as variable type
Requirements that are the most easily described can often be the most difficult to implement. I’m referring to requests like: Display a gauge with the most recently collected metric. Plot a 18 month rolling window of profit. Display last month’s products percent of total metrics for visual comparison. Okay, so
Have you ever needed to run code based on the client application that you are using? Or have you needed to know the version of SAS® software that you are running and the operating system that you are running it on? This blog post describes a few automatic macro variables
Recently, one of sons came to me and asked about something called “The Monty Hall Paradox.” They had discussed it in school and he was having a hard time understanding it (as you often do with paradoxes). For those of you who may not be familiar with the Monty Hall
Over the past 37 years I've had the good fortune to be able to attend and present at hundreds of in-house, local, regional, special-interest and international SAS events. I am a conference junkie. I've not only attended thousands of presentations, Hands-On Workshops, tutorials, breakout sessions, quick tips, posters, breakfasts, luncheons,
If you use SAS® software to create a report that contains multiple graphs, you know that each graph appears on a separate page by default. But now you want to really impress your audience by putting multiple graphs on a page. Keep reading because this blog post describes how to
When I attended my first SAS conference in 2003 I was not only a first-timer, I was a first time presenter. Needless to say I was a bit nervous. I did not know what to expect. Was my topic good enough for these savvy programmers and statisticians? Well my first
If you are using the second maintenance release of SAS 9.3 (TS1M2) or later, you might have noticed that you have several map-related libraries that are defined for you. The MAPS library contains the old map data sets that have been provided with SAS/GRAPH® software for many years. The source
Reference lines on a visualization are used to help identify goals or targets, acceptable or unacceptable ranges, etc; basically any metric that puts a frame of reference around the values on the visualization. The Percent of Total of a metric is used to help identify a part-to-whole relationship. It answers
When I think of the Western Users of SAS Software conference, I think of my first event in 1994. I was just starting to learn SAS and wanted to meet others in my region who were also excited about the software. Meeting and discussing SAS topics face to face at the
When you work out, you probably have a routine set of exercises that you do. But if you read health-and-fitness websites or talk to a personal trainer, you know that for optimal fitness, you should vary your workout routine. Not only does adding variety to your fitness regime help you
XML has become one of the major standards for moving data across the Internet. Some of XML’s strengths are the abilities to better describe data and to be more extensible than any of its predecessors such as CSV. Due to the increased popularity of XML for moving data, I provide
Report designers often discover after aggregating data by groups in the Visual Analytics Designer that it would also be nice to see additional aggregations of the data, for example, a maximum or minimum of that sum across groups. This means creating an ‘aggregation of an aggregation.’ If you plan your report objectives in
Being a SAS consultant is about solving problems. In our day-to-day work we solve myriads of all sorts of problems – technical problems, data problems, programming problems, optimization problems – you name it. And in the grand scheme of things we solve business problems. But without a well-defined business
PROC FREQ is often the first choice when you want to generate basic frequency counts, but it is the last choice when it is compared to other statistical reporting procedures. People sometimes consider PROC FREQ last because they think they have little or no control over the appearance of the
In a previous blog, I discussed SAS date and time values, and how date and time formats can be used to your advantage in SAS Visual Analytics. That blog addressed some of the features provided for handling date information, like date formats, date hierarchies, and calculated data items based on time
The DS2 programming language gives you the following powerful capabilities: The precision that results from using the new supported data types Access to the new expressions, write methods, and packages available in the DS2 syntax Ability to execute SAS Federated Query Language (FedSQL) from within the DS2 program Ability to
On the search for some SAS notes, workarounds or sample code? What you may not know is that there are a ton of SAS resources out there providing examples, tips and tricks that are great to have in your tool belt! Many of these resources provide sufficient insight and resolutions
One of the hidden gems of SAS Studio is the ability to run process flows in parallel. This feature really shines when used in a grid environment. Let’s discuss this one step at a time. First, what is a process flow? When working in the Visual Programmer perspective, you have
You may have noticed that when using date information in SAS Visual Analytics, that the date data values can be displayed in a variety of ways. You may see your dates displayed like Jan1916, 03Jun1915, or 03/12/16, for example. In this blog I’ll help you understand SAS date and time
Being able to access information about your operating system from within SAS can be incredibly useful. For example, if you have a directory that contains an unknown number of CSV files that you would like to read into SAS, you certainly would not want to have to write an IMPORT
In my previous post, Introducing data-driven loops, I suggested a way of implementing programming loops with a list of index variables pulled from an external data table. These ordinary programming loops iterate during code execution while processing some data elements of an input data table. SAS macro loops, on the
I recently received a call from a colleague that is using parallel processing in a grid environment; he lamented that SAS Enterprise Guide did not show in the work library any of the tables that were successfully created in his project. The issue was very clear in my mind, but
PROC DS2 (DS2) is a new SAS programming language that extends the power of the traditional DATA step. Some customers have wondered if this new functionality is simply the “DATA step on steroids,” meaning that we simply added more robust functionality so that it’s a replacement for the DATA step.
Programming loops are a staple of any computer programming language. In essence, loops are what make programming languages so powerful. In all programming loops, a group of statements is executed repeatedly based on the value of an index variable that changes from one iteration to another. The iterations are continued
As support analysts in the SAS Technical Support division, we answer many phone calls from SAS customers. As members of the SAS Foundation team, we get questions that vary significantly in content from all of the areas that we support. We offer coding tips and suggestions as well as point