| Functions and CALL Routines |
| Valid in: | DATA step, PROC SQL, and SCL |
| Syntax | |
| Details | |
| Example |
Syntax |
| DQCASE(char, 'case-definition' <, 'locale'>) |
is the value that is transformed, according to the specified case definition. The value can be the name of a character variable, a character value in quotation marks, or an expression that evaluates to a variable name or a quoted value.
specifies the name of the case definition that will be referenced during the transformation. If the content of the char value is represented by a case definition, that definition is recommended above a generic case definition. For example, if your char value is a street address and if you are using the ENUSA locale, the recommended case definition would be PROPER-ADDRESS rather than the generic case definition PROPER.
| Restriction: | the specified case definition must exist in the specified locale. |
(optional) specifies the name of the locale that contains the specified case 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
| Default: | the first locale in the locale list. |
| Restriction: | If no value is specified, the default locale is used. |
| See: | Load and Unload Locales |
| Details |
The DQCASE function operates on any character content, such as names, organizations, and addresses.
| Example |
The following example standardizes capitalization and spacing with the PROPER case definition in the ENUSA locale.
orgname=dqCase("BILL'S PLUMBING & HEATING", 'Proper', 'ENUSA');
After this function call, the value for the ORGNAME variable is Bill's Plumbing & Heating.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.