Functions That Divide Strings into ”Words”

These extremely useful functions and CALL routines can divide a string into words. Words can be characters separated by blanks or other delimiters that you specify.

SCAN

The SCAN function is the premier function that can separate parts of a character value. The most popular use of this function, at least by this author, is to obtain first, middle, and last names when they are all stored in a single variable (don't you just hate that?). With the ability to define delimiters and with the addition of modifiers (SAS 9.2), this function is even more powerful.

The first edition of this book included a discussion of the SCANQ function. This function has been dropped from this edition since all the features ...

Get SAS Functions by Example, Second Edition, 2nd Edition 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.