Previous Page | Next Page

Functions and CALL Routines

DQPATTERN Function



Returns a pattern analysis from an input character value.
Requirement: If specified, the locale must be loaded into memory as part of the locale list.
Valid in: DATA step and SCL

Syntax
Arguments
Details
Example

Syntax

DQPATTERN ('char', 'pattern-analysis-definition'<,'locale'>)

Arguments

char

specifies a character constant, variable, or expression that contains the value that is the name of the input character value that is analyzed.

pattern-analysis-definition

is the name of the pattern analysis definition. The definition must exist in the locale that is used.

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.

Details

The DQPATTERN function returns a pattern analysis from an input character value. DQPATTERN identifies words or characters in the input value as numeric, alphabetic, non-alphanumeric, or mixed. The choice of pattern analysis definition determines the nature of the analysis as follows:

*

non-alphanumeric, such as punctuation marks or symbols.

A

alphabetic.

M

mixture of alphabetic, numeric, and non-alphanumeric.

N

numeric.


Example

The following example analyzes the words in the input character value. The results are written to the SAS log using the PUT statement.

pattern=dqPattern('WIDGETS 5','32CT','WORD','ENUSA'); 
put pattern;

The DQPATTERN function returns A N* M. Using the CHARACTER pattern analysis definition returns AAAAAAA N* NNAA.

Previous Page | Next Page | Top of Page