SAS Institute. The Power to Know

SAS(R) Data Quality Server 9.2: Reference

Previous Page | Next Page

The DQSCHEME Procedure

APPLY Statement


Applies a scheme to transform the values of a single variable.
See also: Applying Schemes.

APPLY
SCHEME=scheme-name
VAR=variable-name
<SCHEME_LOOKUP=EXACT | IGNORE_CASE | USE_MATCHDEF>
<MATCHDEF=match definition>
<SENSITIVITY=complexity-factor>
<LOCALE=locale-name>
<MODE=PHRASE | ELEMENT>;

LOCALE=locale-name

specifies the locale that contains the match definition that is specified in the MATCHDEF= option as follows:

  • if USE_MATCHDEF is specified and LOCALE= is not specified, the default locale is used.

  • if USE_MATCHDEF is not specified, the locale that is stored in the scheme is used.

  • if a locale is not stored in the scheme, the default locale is used.

Default: the first locale in the locale list.
Restriction: valid only when SCHEME_LOOKUP = USE_MATCHDEF.
See: Load and Unload Locales.
MATCHDEF=match-definition

specifies the name of the match definition, in the specified locale, that is used to create match codes during the application of the scheme.

If USE_MATCHDEF is specified, and the MATCHDEF= option is not specified, the match definition that is stored in the scheme is used. If USE_MATCHDEF is not specified and a match definition is not stored in the scheme, then a value is required for the MATCHDEF= option.

For information on available match definitions, see the documentation for your locale, or submit the AUTOCALL macro %DQPUTLOC.

Restriction: This option is valid only when SCHEME_LOOKUP= USE_MATCHDEF.
See also: %DQPUTLOC AUTOCALL Macro
MODE=PHRASE | ELEMENT

specifies how the scheme is to be applied. The default value is the mode that is stored in the scheme. If no mode is stored in the scheme, then PHRASE is the default mode.

Valid values for the MODE= option are defined as follows:

PHRASE

specifies that the entirety of each value of the input character variable is compared to the data values in the scheme. When SCHEME_LOOKUP=USE_MATCHDEF, the match code for the entire input value is compared to the match codes that are generated for each DATA value in the scheme.

ELEMENT

specifies that each element in each value of the input character variable is compared to the DATA values in the scheme. When SCHEME_LOOKUP=USE_MATCHDEF, for each data value in the scheme, the match code for each element is compared to the match codes generated for each element.

SCHEME=scheme-name

identifies the scheme to apply to the input data set. In all operating environments other than z/OS, schemes using BFD format are identified by specifying a fileref for a fully qualified filename that ends in .sch.bfd. In the z/OS operating environment, no special naming conventions are required. For schemes with SAS format, specify a one-level or two-level SAS data set name.

SCHEME_LOOKUP=EXACT | IGNORE_CASE | USE_MATCHDEF

specifies one of three mutually exclusive methods of applying the scheme to the values of the input character variable. Valid values are defined as follows:

EXACT

this default value specifies that the values of the input variable are to be compared to the DATA values in the scheme without changing the input values in any way. The transformation value in the scheme is written into the output data set only when an input value exactly matches a DATA value in the scheme. Any adjacent blank spaces in the input values are replaced with single blank spaces before comparison.

IGNORE_CASE

specifies that capitalization is to be ignored when input values are compared to the DATA values in the scheme. Any adjacent blank spaces in the input values are replaced with single blank spaces before comparison.

USE_MATCHDEF

specifies that comparisons are to be made between the match codes of the input values and the match codes of the DATA values in the scheme. A transformation occurs when the match code of an input value is identical to the match code of a DATA value in the scheme.

Specifying USE_MATCHDEF makes available the options LOCALE=, MATCHDEF=, and SENSITIVITY=, which can be used to override the default values that might be stored in the scheme.

Note:   The options LOCALE=, MATCHDEF=, and SENSITIVITY= are valid only when SCHEME_LOOKUP= USE_MATCHDEF.  [cautionend]

SENSITIVITY=complexity-factor

specifies the amount of information in the match codes that are created during the application of the scheme. With higher sensitivity values, two values must be increasingly similar to create the same match code. At lower sensitivity values, two values can receive the same match code despite dissimilarities.

Note:   The SENSITIVITY= option is valid only when SCHEME_LOOKUP= USE_MATCHDEF.  [cautionend]

If USE_MATCHDEF is specified and SENSITIVITY= is not specified, the sensitivity value is 85. If USE_MATCHDEF is not specified, the sensitivity value is the value that is stored in the scheme. If USE_MATCHDEF is not specified and if a sensitivity value is not stored in the scheme, the sensitivity value is 85.

Valid values for the SENSITIVITY= option range from 50 to 95.

VAR=variable-name

identifies the character variable in the input data set that is to be transformed. The maximum length of input values is 1024 bytes.

Previous Page | Next Page | Top of Page