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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.