MP Code - Masked Packed Decimal

The MP code converts packed decimals to unpacked decimal representation for output or decimal values to packed decimals for input.

Input Conversion

Input conversion is valid. Generally, for selection processing you should specify MP codes in atttribute 7 of the data definition item.

Syntax

MP

Comments

The MP code is generally used as an output conversion. On input, the MP processor combines pairs of 8-bit ASCII digits into single 8-bit digits as follows:

Recommendation

Do not use packed decimal fields in your application.

When you want to display packed decimal data, you should specify the MP code because packed values do not display in a recognizable format and many packed codes are recognized by terminals as terminal control characters.