MC Codes

Using Masked Character Codes. Most of the character masking codes extract certain classes of characters from a string. Alphabetic, nonalphabetic, numeric, or nonnumeric characters can be extracted. Spaces are treated as non-alphanumeric characters. Other MC codes convert uppercase data to lowercase and vice versa.

Code

Description

MCA

Extracts all alphabetic characters, both uppercase and lowercase. Nonalphabetic characters, including spaces, are not printed.

MC/A

Extracts all nonalphabetic characters, including spaces. Alphabetic characters are not printed.

MCL

Converts all uppercase letters to lowercase. Does not affect lowercase letters or nonalphabetic characters.

MCN

Extracts all numeric characters. Nonnumeric characters, including spaces, are not printed.

MC/N

Extracts all nonnumeric characters, including spaces. Numeric characters are not printed.

MCP

Converts non-printable characters to dots and drops the high-order bit of all characters above character 127.

MCT

Converts the first character of each word to uppercase and all other characters to lowercase. Does not affect nonalphabetic characters. A word begins after any nonalphabetic character except a single or double quote.

MCU

Converts all lowercase letters to uppercase. Does not affect uppercase letters or nonalphabetic characters.

NOTE- When performing an oconv (,'MCU') on a string that contains an attribute mark, only the portion of the string prior to the attribute mark is converted.

The table below contains examples of these codes. A space is represented by a à.

Data

Code

Output

*Boston,àMAàà02134

MCA

BostonMA

*Boston,àMAàà02134

MC/A

*,ààà02134

*Boston,àMAàà02134

MCL

boston,àmaàà02134

*Boston,àMAàà02134

MCN

02134

*Boston,àMAàà02134

MC/N

Boston,àMAàà

*Boston,àMAàà02134

MCT

*Boston,àMaàà02134

*Boston,àMAàà02134

MCU

*Boston,MAà02134’,’MCU

See Also

Formatting Data

D Code

MT Code

ML and MR Codes

MCDX and MCXD Codes

MX and MY Codes