| Functions and CALL Routines |
| Valid in: | DATA step, PROC SQL, or SCL |
| Syntax | |
| Details | |
| Example |
Syntax |
| DQMATCHINFOGET(`match-definition' <, `locale'>) |
specifies the name of the match definition, which must exist in the specified locale.
(optional) specifies the name of the locale that contains the specified match definition. The value can be a name in quotation marks, the name of a variable whose value is a locale name, or an expression that evaluates to a variable name or to a quoted locale name.
The specified locale must be loaded into memory as part of the locale list. If no value is specified, the default locale is used. The default locale is the first locale in the locale list. For information on the locale list, see Load and Unload Locales.
| Details |
The DQMATCHINFOGET function returns the name of the parse definition that is associated with the specified match definition. Obtaining the name of that parse definition enables you to create parsed character values with the DQPARSE or DQPARSETOKENPUT functions. If the specified match definition does not have an associated parse definition, the DQMATCHINFOGET function returns a missing value.
| Example |
The following example displays the name of the parse definition that is associated with the NAME match definition in the ENUSA locale. That parse definition is then used to display the tokens that are enabled for that parse definition. The tokens are then used to construct a parsed value, create and return a match code, and display the match code.
data _null_; parseDefn=dqMatchInfoGet('Name', 'ENUSA'); tokens=dqParseInfoGet(parseDefn); put parseDefn= / tokens=; run; data _null_; length parsedValue $ 200 matchCode $ 15; parsedValue=dqParseTokenPut(parsedValue, 'Joel', 'Given Name', 'Name'); parsedValue=dqParseTokenPut(parsedValue, 'Alston', 'Family Name', 'Name'); matchCode=dqMatchParsed(parsedValue, 'Name'); put matchCode=; run;
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.