MC Conversions

Character Masks. The Masked Character conversion codes allow the user to translate data from one case to another or to extract certain classes of characters.

MCA

Extracts all alphabetic characters, both upper-and lowercase. Non-alphabetic characters are not printed.

MC/A

Extracts all non-alphabetic characters. Alphabetic characters are not printed.

MCL

Converts all uppercase letters to lowercase. Does not affect lowercase letters or non-alphabetic characters.

MCN

Extracts all numeric characters. Alphabetic characters are not printed.

MC/N

Extracts all non-numeric characters. 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 non-alphabetic characters. A word begins after any non-alphabetic character except a single or double quote.

MCU

Converts all lowercase letters to uppercase. Does not affect uppercase letters or non-alphabetic 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 and the remainder is truncated.

Using MC Conversions

If input is...

and conversion is...

then output is...

BLEAR34TRE

MCA

BLEARTRE

BLEAR34TRE

MC/A

34

BLEAR34TRE

MCL

blear34tre

#$abc123

MCN

123

#$abc123

MC/N

#$abc

#$abc123

MCU

#$ABC123

JOHN SMITH

MCT

John Smith

See Also

Correlatives and Conversions Reference