Creating New Character Values

Extracting a Portion of a Character Value

Understanding the SCAN Function

Some character values might contain multiple pieces of information that need to be isolated and assigned to separate character variables. For example, the value of ArrivalDepartureGates contains two cities: the city of arrival and the city of departure. How can the individual values be isolated so that separate variables can be created for the two cities?
The SCAN function returns a character string when it is given the source string, the position of the desired character string, and a character delimiter:
SCAN (source, n<,list-of-delimiters>)
source is the value that you want to examine. It can be any type of character expression, including ...

Get Step-by-Step Programming with Base SAS 9.4 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.