Modifying Character Values with Functions

SCAN Function

Overview of the SCAN Function

The SCAN function returns the nth word from a character string. The SCAN function enables you to separate a character value into words and to return a specified word.
Figure 14.16 SCAN Function
Scan Function
Note: In SAS 9.4 or later, in a DATA step, the SCAN function returns a value to a variable that has not yet been given a length, that variable is given the length of the first argument. In SAS 9.3 or earlier, by default, the variable is assigned a length of 200.
Syntax, SCAN function:
SCAN(argument,n<,<delimiters>>)
  • argument specifies the character variable ...

Get SAS Certification Prep Guide, 4th 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.