Character Conversion (MCx)

Character Conversion (MCx)

Top  Previous  Next

 

The character conversion codes perform various character based conversions.

 

MCADelete all non-alphabetic characters.
MC/ADelete all alphabetic characters.
MCANDelete all non-alphanumeric characters.
MC/ANDelete all alphanumeric characters.
MCLConvert to lower case.
MCN{-}Delete all non-numeric characters. The optional minus sign treats a leading minus sign in the data to be converted as a numeric character.
MC/N{-}Delete all numeric characters. The optional minus sign treats a leading minus sign in the data to be converted as a numeric character.
MCP{c}Replace non-printing characters by character c, using period if c is omitted. The substitute character may optionally be enclosed in single or double quotes. An empty set of quotes removes non-printing characters instead of replacing them.
MCSConvert first alphabetic character in each sentence to uppercase, leaving all other characters unchanged.
MCTCapital initial all words (see below).
MCUConvert to uppercase.

 

These conversion codes behave identically for both input and output conversion.

 
Character types (digit, alphabetic, printing, etc) are determined by the currently selected character map. See Extended Character Set Support for more information relating to ECS mode systems or the Character Maps on Non-ECS Systems subsection.

 

The MCT conversion code is implemented differently across various multivalue products. The default behaviour of QM is to match D3 and other Pick style products where the first letter after a non-alphabetic character is converted to uppercase, all others to lowercase. Use of the SPACE.MCT mode of the OPTION command enables the behaviour found in Information style products such as UniVerse whereby letters immediately following a space are converted to uppercase, all others to lowercase. In both modes, the first character of the string is converted to uppercase.

 

 

Examples

 

Data

Code

Result

267PS-A17

MCA

PSA

267PS-A17

MC/A

267-17

267PS-A17

MCAN

267PSA17

267PS-A17

MC/AN

-

267PS-A17

MCN

26717

267PS-A17

MC/N

PS-A

-123-456

MCN

123456

-123-456

MCN-

-123456

-123-456

MC/N-

-

Red pencil

MCL

red pencil

Red pencil

MCU

RED PENCIL

Red pencil

MCT

Red Pencil

123FM456

MCP

123.456

123FM456

MCP?

123?456

123FM456

MCP"x"

123x456

123FM456

MCP""

123456

abc. dE. 1f

MCS

Abc. DE. 1F