Previous Page | Next Page

Functions and CALL Routines

DQTOKEN Function



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

Syntax
Arguments
Details
Example
See Also

Syntax

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

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.

parse-definition

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

token

identifies the token that is returned.

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

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.


See Also

Functions:

DQPARSE Function

DQPARSETOKENGET Function

Previous Page | Next Page | Top of Page