Last December I taught a SAS Programming 1: Essentials class at Statistics Canada (Statcan). My class could barely contain their mirth while I valiantly struggled to find the semicolon on the French keyboard. Far cry from my first move to Canada (which is a bilingual country) and my excitement about practicing French learned at Alliance Française. Clearly it has gotten rusty as my recent keyboard experience proved. So when this January rolled along, I’m sure you can picture the resolve that first jumped to mind. Thanks to my humbling Statcan experience my lofty new year’s work aspiration is to teach a SAS course in French or maybe present to a user group in French!
Meanwhile here is a SAS resolution to consider for an easy data life:
Scrub data with the SOUNDS-LIKE operator
I have to confess this is a personal favourite. Having worked at Devry Institute of Technology, from personal experience, I’ve seen just how complex student registration data can get. So how did I go about finding all clients from the suburb of Mississauga without complex WHERE clauses? Take a look at my data with its many misspellings and the code I wrote to capture it.
The clever SOUNDS-LIKE operator (=*) uses the SOUNDEX algorithm to test whether a character variable contains a spelling variation of a word. It searches and selects character data based on two expressions: the search value and the matched value and brings up possible phonetic variations. So you too can find misspelled data easily with no complicated coding involved. You can find additional information on the SOUNDS-LIKE operator from this SUGI 29 paper.
As a musician I am constantly listening to other forms and rhythms. I’d like to leave you with a catchy beat played at parties over the holidays. From the island of Mauritius on the Indian Ocean here’s the Sega –sounds like fun, doesn’t it. Did you find the SOUNDS-LIKE operator useful? Isn’t it more fun to keep than that spinning class resolve? I’d love to hear any resolutions, SAS or otherwise that you might have made!