The PATTERN function examines a source string and produces a
pattern that indicates the sequence of numbers, uppercase letters,
and lowercase letters in the source string. This function is useful
for examining data to make sure that it follows a standard pattern.
In the output pattern:
- Any character
from the input that represents a single-byte digit becomes the character 9.
- Any character
that represents an uppercase letter becomes A,
and any character that represents a lowercase letter becomes a.
For European NLS mode (Western Europe, Central Europe), A and a are
extended to apply to accented alphabets.
- For Japanese,
double-byte characters and Hankaku-katakana become C (uppercase).
Note that double-byte includes Hiragana, Katakana, Kanji, full-width
alphabets, full-width numbers, and full-width symbols. This means
that all double-byte letters such as Chinese and Korean are also
represented as C.
- Special characters
remain unchanged.
- An unprintable
character becomes the character X.