Google SAS Search

Add to Google

Tuesday, December 20, 2011

Fat Fingers

I just looked at some code I had written a few months ago. It categorized things based on a bunch of criteria. At the end of the data step I output the categories that did not fit into a definition bucket nicely:

if bucket in(12,11,10,7,6,5,4) then output junk;

But then I remembered that I also wanted to see if any of them went past all the logic and came up with a missing bucket:

if bucket in(12,11,10,7,6,5,4.) then output junk;

Of course, YOU can see that I forgot the last comma between the 4 and . So missings weren't actually included. I didn't actually see it till today. Doh!

Tuesday, December 06, 2011

SAS 9.3

Why is SAS 9.3 so big? Wait, not big.

Thursday, December 01, 2011

Little Utility Macro

A lot of times when I am working with interactive SAS, I find myself staring at a SAS date that has not been formatted. The quickest way to see the actual date was to go to my "scratch" enhanced editor and write a quick data _null_ to put it to the log. That was before I realized that macros can be invoked from the command line.

%macro date(d);
%let r = %sysfunc( putN(&d,mmddyy10.) );
%put &r;
%mend date;

Now I just put this little guy into my autoexec, and voila! a full 40 seconds of my life saved!

Speaking of saving time, did you know that you can follow my job site on twitter? If you had, you would have seen the newest posting for a SAS BI Developer needed in Maryland $120K/yr.

Just go to and click the twitter button underneath the banner.