Functions and CALL Routines |
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
|
DQTOKEN(char,'token','parse-definition'<,
locale>)
|
- 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. |
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.
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.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.