DQTOKEN Function

Returns a token from a character value.

Valid in: DATA step, PROC SQL, and SCL
Requirement: If specified, the locale must be loaded into memory as part of the locale list.

Syntax

DQTOKEN(char, 'token' , 'parse-definition' <, locale>)

Required Arguments

char

specifies a character constant, variable, or expression that contains the value that is the value from which the specified token is returned, according to the specified parse definition.

token

identifies the token that is returned.

parse-definition

the name of the parse definition. The definition must exist in the locale that is used.

Optional Argument

locale

specifies a character constant, variable, or expression that contains the locale name.

Default The default locale is the first locale in the locale list. If no value is specified, the default locale is used.

Details

Use the DQTOKEN function to parse a value and return one token. If the DQTOKEN function does not find a value for that token, the return value for that token is blank.
To return more than one token from a parsed value, use the functions DQPARSE and DQPARSETOKENGET.

Example: DQTOKEN Function

The following example parses a single token from a character value:
prefix=dqToken('Mrs. Sallie Mae Pravlik','Name Prefix','Name','ENUSA');
After the DQTOKEN call, the value for the PREFIX variable is Mrs.