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.2 SCAN Function
Scan Function
Note: In SAS 9.4 or later, if the variable has not yet been given a length, then the SCAN function returns the value and assigns the variable the given 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 Certified Specialist Prep Guide 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.