Functions and CALL Routines |
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 |
Syntax |
DQSTANDARDIZE (char, ' standardization-definition'<, locale>) |
specifies a character constant, variable, or expression that contains the value that is standardized according to the specified standardization definition.
specifies the name of the standardization definition. The definition must exist in the locale that is used.
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 |
In the locales, standardization definitions are provided for character content such as dates, names, and ZIP codes. The available standardization definitions vary from one locale to the next.
The return value is provided in the appropriate case, with insignificant blank spaces and punctuation removed. The standardization definition that was specified in the DQSTANDARDIZE function might standardize certain words and abbreviations. The order of the elements in the return value might differ from the order of the elements in the input character value.
Example |
The following example standardizes four names using the NAME standardization definition from the ENUSA locale. The following example assumes that the ENUSA locale has been loaded into memory as part of the locale list.
data _null_; length name stdName $ 50; input name $char50.; stdName=dqStandardize(name, 'Name'); put 'Name:' @10 name / 'StdName:' @10 stdName /; datalines; HOUSE, KEN House, Kenneth House, Mr. Ken W. MR. KEN W. HOUSE ; run;
After this function call, the SAS log displays the following information:
Name: HOUSE, KEN StdName: Ken House Name: House, Kenneth StdName: Kenneth House Name: House, Mr. Ken W. StdName: Mr Ken W House Name: MR. KEN W. HOUSE StdName: Mr Ken W House
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.