DQEXTTOKENGET Function

Returns a token from an extraction character value.

Valid in: DATA step, PROC SQL, and SCL
Restriction: Do not attempt to retrieve tokens from extraction values using any means other than the DQEXTTOKENGET function.
Requirement: If specified, the locale must be loaded into memory as part of the locale list.

Syntax

Required Arguments

extraction-char

specifies a character constant, variable, or expression that contains the value that is the extraction character value from which the value of the specified token is returned.

To determine how the extraction definition inserts delimiters, use the DQEXTINFOGET function.

token

the name of the token that is returned from the extraction value. The token must be enabled by the specified extraction definition

extraction-definition

the name of the extraction definition. The definition must exist in the locale that is used. The extraction definition must be the same as the extraction definition that originally extracted the EXTRACTION-CHAR value.

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

The DQEXTTOKENGET function returns the value of the specified token from a previously extracted character value.

Example

The following example extracts a character value with the DQEXTRACT function and extracts two of the tokens with the DQEXTTOKENGET function.
extValue=dqExtract('Mr. James Joseph Westly', 'NAME', 'ENUSA');
prefix=dqExtTokenGet(extValue, 'Name Prefix', 'NAME', 'ENUSA');
given=dqExtTokenGet(extValue, 'Given Name', 'NAME', 'ENUSA');
After these function calls, the value of prefix is Mr. and the value of given is James.