Tag: sas programming

How to convert a Unix datetime to a SAS datetime

I watched with wonder as each of my daughters learned how to “tell time.” Early in their primary school careers, they brought home worksheets that featured clock faces with big-hand/little-hand configurations that they had to decipher, and exercises that asked them to draw the hands as they should appear given […]

The post How to convert a Unix datetime to a SAS datetime appeared first on The SAS Dummy.

How to compare SAS programs in SAS Enterprise Guide

Copy/paste is my favorite method for creating new SAS programs. In my work projects, I maintain a sort of genealogy of SAS programs, because the DNA of one program can be used to spawn many other SAS programs as its progeny. When things (inevitably) aren’t working as I intend in […]

The post How to compare SAS programs in SAS Enterprise Guide appeared first on The SAS Dummy.

How to split one data set into many

Back in the day when the prison system forced inmates to perform “hard labor”, folks would say (of someone in prison): “He’s busy making little ones out of big ones.” This evokes the cliché image of inmates who are chained together, forced to swing a chisel to break large rocks […]

The post How to split one data set into many appeared first on The SAS Dummy.

New SAS programming features in SAS Enterprise Guide 7.1

SAS Enterprise Guide 7.1 began shipping last week. Of the many new features, some are “biggies” while others are more subtle. My favorite new features are those for SAS programmers, including several items that I’ve heard customers ask for specifically. I’ll describe them briefly here; the SAS Enterprise Guide online […]

The post New SAS programming features in SAS Enterprise Guide 7.1 appeared first on The SAS Dummy.

Your data ain’t good looking, but it has a nice cardinality

Data cardinality is an important topic for for data analysis. In mathematical terms, cardinality is simply the number of elements in a set. But in data applications, cardinality signifies the number of unique values for a given field of data. Related terms include number of levels (thank you, PROC FREQ […]

Put them back the way you found them: restoring SAS titles

Has this ever happened to you? You have a SAS program with statements that you wrote, then you make use of a macro function or %include file supplied by a helpful colleague, and when your SAS code resumes, you find that all of your SAS titles have been changed out […]

Copy a file using a SAS program: another method

A couple of years ago I shared a method for copying any file within a SAS program. It was a simple approach, copying the file byte-by-byte from one fileref (SAS file reference) to another. My colleague Bruno Müller, a SAS trainer in Switzerland, has since provided a much more robust […]

SAS Tech Talk: What’s new in the SAS programming language?

In SAS 9.4, the SAS programming language continues add new features by the truckload. I’ve already discussed PROC DELETE (which is actually an old feature, but like an 80s hit song it’s now back with a better version). In this SAS Tech Talk video from SAS Global Forum 2013, I […]