SAS Tutorial: Tips to Use SAS More Effectively

Streamlining SAS Programming Professionally

In this 5-minute SAS tutorial, Stanley Yuen shares his tips for using SAS more effectively.

“Sometimes, programmers can get stuck into programming only one way. This can be a real problem when you encounter coding that isn’t very recognizable,” says Stanley. “You must have some flexibility and willingness to learn new techniques. Especially when you’re validating somebody else’s program, or even when taking over a program.”

If coding doesn’t follow what you’re used to, it can make your work almost impossible.

Finding Specific Solutions to Specific Problems

There is a huge number of resources available to programmers, but sometimes it’s difficult to find the one that delivers the solution to your specific problem. Not because the solution isn’t there, but because there’s an almost infinite number of articles and user groups to explore.

“Sometimes there’s information overload,” says Stanley. “It can also be outdated. So, you must be careful about the solutions you adopt.”

So, how does Stanley keep on top of the ever-evolving SAS?

Tip #1: Retire and Replace

“Whenever I learn a new function and it’s useful, I retire older functions that I have,” explains Stanley. “They consolidate a lot of different features into a single function. An example is concatenation functions. I see other people’s code, and it’s a lot of substrings: several different functions when one function can do the whole synchronous action.”

Tip #2: Develop a Code Database

Another tip is to save the code that you develop – especially the functions that are repeatable and can be used in different scenarios.

“Building a database of code and functions is another useful idea. Instead of making it, thinking ‘that’s really good’ and setting and forgetting, a database of your best work will give you ‘ready-made’ functions that you can copy and paste into new work,” says Stanley. “When you think ‘Hey, I’ve done this before’, a database like this saves time-consuming searching to locate the program that you used that code in before.”

Tip #3: Reach Out

Another great tip is to reach out. Programmers love sharing their experiences – hence, so many user groups and communities. You could reach out to these online, but you should never be afraid of asking one of your colleagues for the benefit of their experience.

Often, you’ll find that one of your closest team members has encountered the exact issue you are finding challenging. You could have the problem solved in just a few minutes.

Tip #4: Use the SAS Enterprise Guide to Generate Code

You can generate code through the SAS Enterprise Guide Tool. There are some very robust procedures that you include, and have the code generated for you. It’s great for basic coding, but for more complex solutions you’ll need to do the ‘sweat work’ yourself – the code generator produces code for internalized functions that only works in the specific company.

Tip #5: Keep Updated with New SAS Products

SAS is continually releasing new products. They have some very sophisticated AI and analytics tools, too. It pays to make sure you follow SAS and keep your knowledge up to date. Some of the tools, you configure, add a source, and it does pretty much everything for you.

Share Your SAS Tips

We love sharing tips on how to use SAS more effectively, and we realize that there is a mountain of tips that would help others work more efficiently with SAS. What is your best SAS tip? Send us a quick message and let us know your best tips – we may even include it in our next SAS tutorial.