Jedi SAS Tricks: FUNC(y) Formats

In the previous episode, we built our own custom SAS function – a masterful trick indeed. Gordon Keener, a developer here at SAS, responded exuberantly “You think that’s cool? – try THIS!” and proceeded to demonstrate prodigious powers with the SAS by using a custom function in a custom informat [...]

Post a Comment

Jedi SAS Tricks – Roll Your Own Function

A SAS user (who lives in the the US) emailed me a question about SAS functions. He was reading UTC (Coordinated Universal Time) datetime values from server logs, and to make future calculations and comparisons easier, he wanted to transform the value to local datetime.  The INTNX() function worked great, but [...]

Post a Comment

Debug SAS problems; don't repair drywall

Several years ago, my husband and I were remodeling our first house together.  We decided we wanted to have cable television upstairs.  Being young, foolish and lacking in disposable income, we decided to do it ourselves.  My husband said he would run the cable through the attic and drop it [...]

Post a Comment

Syntactic sugar - 6 SAS essentials

The 25 boys I teach on Sundays loved these cupcakes I baked for them for Easter… the sugared peeps had them completely satisfied. I love my tea or coffee laced with sugar. I think you‘d all agree that it is always more pleasant to meet a nice customer service person [...]

Post a Comment

Jedi SAS Tricks: These aren't the droids... Episode 1

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 Knowledge Series class, “SAS Functions by Example”, and had the privilege of taking the class as a student under Ron’s tutelage. [...]

Post a Comment

Jedi SAS Tricks: Building a Name Suffix variable list

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 [...]

Post a Comment

Weekday Morning Quick-trick: How to Score from PROC VARCLUS

Have you used multivariate procedures in SAS and wanted to save out scores? Some procedures, such as FACTOR, CANDISC, CANCORR, PRINCOMP, and others have an OUT= option to save scores to the input data set. However, to score a new data set, or to perform scoring with multivariate procedures that [...]

Post a Comment

How SAS engines can read a range of data in Excel

Japan has a superfast train called the Shinkansen. The first I heard of it was when my sister visited Japan on a scholarship. Engine-awestruck, we wanted a ride, but weren’t able to get to Japan. Nor, did we know the language. (With over 5000 kanjis, it took my sister 3 [...]

Post a Comment

Jedi SAS Tricks: Custom Bookmarks

I was building a nice little PDF report the other day.  I love the way ODS PDF replicates the SAS Results window navigation structure as PDF bookmarks, but… I’d much rather write the text for the bookmarks myself.  So, I decided to "use the SAS" and make ODS do my [...]

Post a Comment

Why Can't SAS Read My CSV file?

Many SAS users receive data in the form of CSV (Comma Separated Value) files, and need to convert them to SAS data sets. A typical record in a CSV file might look like this: Jeter,Derek,1995,,234,”22,600,000” Note the following about the record above: There is no data for the fourth field, [...]

Post a Comment