Can you Lag and Lead at the same time? If using the SAS DATA step, yes you can

Within the SAS DATA step, the LAG function is provided to return a variable’s value from a previous data set observation.  With certain data criteria, sometimes there is a need to look ahead at the next observation and you would expect to use a LEAD function, but this does not […]

Post a Comment

ODS PDF destination in SAS 9.4: Come take a look under the hood!

If you have programmed with SAS in the last 15 years, you have probably had a reason to share your SAS results in PDF format. The ODS PDF destination, much like a well-designed car, has evolved over the years, offering progressively nicer features like security, enhanced image formatting and embedded […]

Post a Comment

Turning text files into SAS data sets—6 common problems and their solutions

If you’re reading this blog post, you have probably gotten a text file from someone that needs to be turned into a SAS data set so that it can be manipulated, analyzed and made into a report. It all starts with getting the data into SAS. Sometimes that requires a […]

Post a Comment

Using SAS to add PivotTables to your Excel workbook

In Microsoft Excel, a PivotTable can help you to create an interactive view of summarized data. Within a PivotTable, it’s easy to adjust the dimensions (columns and rows) and calculated measures to suit your ad-hoc reporting needs. You can also create a PivotChart – similar in concept to a PivotTable, but […]

Post a Comment

SAS macro variables: how to determine scope

Have you ever created a SAS macro variable and at resolution time received a warning that it did not exist? Many times this warning is because your program referenced the macro variable outside the scope it was created in. Every macro variable created is stored in one of two symbol […]

Post a Comment

How to perform a fuzzy match using SAS functions

“Here’s Johnny!!!” and well sometimes John and sometimes Jonathan and sometimes Jon. In the real world, you sometimes need to make matching character strings more flexible. This is especially common when merging data sets. Variables, especially names, are not always exactly the same in all sources of your data. When […]

Post a Comment

Have you created Scalable Vector Graphics with SAS?

If you haven’t tried them for your web applications and other graphics needs, you’ll want to read further! Scalable Vector Graphics (SVG) output is vector graphics output you can display with most (if not all) modern web browsers. Because SVG graphic output is scalable, you can zoom in on the […]

Post a Comment

SAS arrays—be not afraid!

Arrays are a powerful SAS programming tool. They can be used to simplify coding for repetitive calculations, to transpose data and to evaluate variables in a non-sequential manner. Sometimes users are intimidated by the term array, but in SAS, an array is simply a grouping of variables that lasts for […]

Post a Comment

SAS macro errors: the answers you’re looking for

Have you ever received an error or warning in SAS macro and did not know what to do next or even where to look?  Now there is an answer! And debugging your SAS macros just got easier. All macro errors and warnings are now documented in the SAS 9.4 Macro […]

Post a Comment

Symbols in SAS 9.4 graphs: unlimited possibilities

Beginning with the first maintenance of SAS 9.4, you have the ability to define your own symbol markers using the SYMBOLCHAR and SYMBOLIMAGE statements. With these statements you can select a Unicode value or you can select an image file that exists on the local file system—making the possibilities for […]

Post a Comment