Masked Character Conversion

Formats

MCA
MC/A
MCD[X]
MCL
MCM
MC/M
MCN
MC/N
MCP
MCT
MCU
MCW
MCX[D]

The MC codes let you change a field's data to upper- or lowercase, to extract certain classes of characters, to capitalize words in the field, and to change unprintable characters to periods.

MCA
Extracts all alphabetic characters in the field, both upper- and lowercase. Nonalphabetic characters are not printed. In NLS mode, uses the ALPHABETICS field in the NLS.LC.CTYPE file.
MC/A
Extracts all nonalphabetic characters in the field. Alphabetic characters are not printed. In NLS mode, uses the NON-ALPHABETICS field in the NLS.LC.CTYPE file.
MCD[X]
Converts decimal to hexadecimal equivalents.
MCL
Converts all uppercase letters to lowercase. Does not affect lowercase letters or nonalphabetic characters. In NLS mode, uses the UPPERCASE and DOWNCASED fields in the NLS.LC.CTYPE file.
MCM
Use only if NLS is enabled. Extracts all NLS multibyte characters in the field. Multibyte characters are all those outside the Unicode range (x0000-x007F), the InfoSphere® DataStage® system delimiters, and the null value. As long as NLS is enabled, the conversion still works if locales are off. If NLS mode is disabled, the code returns a STATUS of 2, that is, an invalid conversion code.
MC/M
Use only if NLS is enabled. Extracts all NLS single-byte characters in the field. Single-byte characters are all those in the Unicode range x0000-x007F. As long as NLS is enabled, the conversion still works if locales are off. If NLS mode is disabled, the code returns a STATUS of 2, that is, an invalid conversion code.
MCN
Extracts all numeric characters in the field. Alphabetic characters are not printed. In NLS mode, uses the NUMERICS field in the NLS.LC.CTYPE file.
MC/N
Extracts all nonnumeric characters in the field. Numeric characters are not printed. In NLS mode, uses the NON-NUMERICS field in the NLS.LC.CTYPE file.
MCP
Converts each unprintable character to a period. In NLS mode, uses the PRINTABLE and NON_PRINTABLE fields in the NLS.LC.CTYPE file.
MCT
Capitalizes the first letter of each word in the field (the remainder of the word is converted to lowercase). In NLS mode, uses the LOWERCASE and UPCASED fields of the NLS.LC.CTYPE file.
MCU
Converts all lowercase letters to uppercase. Does not affect uppercase letters or nonalphabetic characters. In NLS mode, uses the LOWERCASE and UPCASED fields in the NLS.LC.CTYPE file.
MCW
Use only if NLS is enabled. Converts between 7-bit standard ASCII (0021-007E range) and their corresponding double-byte characters, which are two display positions in width (FF01-FF5E fullwidth range). As long as NLS is enabled, the conversion still works if locales are off. If NLS mode is disabled, the code returns a STATUS of 2, that is, an invalid conversion code.
MCX[D]
Converts hexadecimal to decimal equivalents.