Chapter 1: My Favorite Functions


Concatenating Strings

Converting Numbers to Characters

Adding Delimiters

Using the OF Shortcut

Removing Leading and Trailing Spaces

Finding Non-Blank Values

Creating Datetime Values

Creating Macro Variables

Finding Words

Counting Words

Replacing Substrings

Using %SYSFUNC() to Run DATA Step Functions


There are literally hundreds of DATA step functions. It is so easy to get overwhelmed by the sheer volume that you miss can some real gems. Here are some functions that I can’t live without and some different ways to use them.

Concatenating Strings

If you need to combine two or more strings into a single string, you can use the concatenation operator: ||. For example, you can take two strings ...

Get Practical and Efficient SAS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.