Functions and CALL Routines |
Requirement: | If specified, the locale must be loaded into memory as part of the locale list. |
Restriction: | Do not attempt to extract tokens from parsed values using any means other than the DQPARSETOKENGET function. |
Valid in: | DATA step, PROC SQL, and SCL |
Syntax | |
Arguments | |
Details | |
Example | |
See Also |
Syntax |
DQPARSETOKENGET(parsed-char,'parse-definition', 'token',<,'locale'>) |
specifies a character constant, variable, or expression that contains the value that is the parsed character value from which the value of the specified token is returned.
To determine how the parse definition inserts delimiters, use the DQPARSEINFOGET function.
is the name of the parse definition. The definition must exist in the locale that is used. The parse definition must be the same as the parse definition that originally parsed the PARSED-CHAR value.
is the name of the token that is returned from the parsed value. The token must be enabled by the specified parse definition
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 DQPARSETOKENGET function returns the value of the specified token from a previously parsed character value.
Example |
The following example parses a character value with the DQPARSE function and extracts two of the tokens with the DQPARSETOKENGET function.
parsedValue=dqParse('Mrs. Sallie Mae Pravlik', 'NAME', 'ENUSA'); prefix=dqParseTokenGet(parsedValue, 'Name Prefix', 'NAME', 'ENUSA'); given=dqParseTokenGet(parsedValue, 'Given Name', 'NAME', 'ENUSA');
After these function calls, the value of prefix is Mrs. and the value of given is Sallie.
See Also |
Functions: |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.