|
The character conversion codes perform various character based conversions.
| MCA | Returns only the alphabetic characters. |
| MC/A | Returns only the non-alphabetic characters. |
| MCAN | Returns only the alphanumeric characters. |
| MC/AN | Returns only the non-alphanumeric characters. |
| MCI | Inverts (reverses) a character string. |
| MCL | Convert to lower case. |
| MCN{-} | Returns only the numeric characters. The optional minus sign treats a leading minus sign in the data as a numeric character. |
| MC/N{-} | Returns only the non-numeric characters. The optional minus sign treats a leading minus sign in the data 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. |
| MCS | Convert first alphabetic character in each sentence to uppercase, leaving all other characters unchanged. |
| MCT | Capital initial all words (see below). |
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-
|
-
|
12345
|
MCI
|
54321
|
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
|
|