Machine encodings on IBM i

Use this information to learn about the structure of the MDENC field in the message descriptor.

For more information about the message descriptor, see MQMD (Message descriptor) on IBM i.

The MDENC field is a 32-bit integer that is divided into four separate subfields; these subfields identify:

  • The encoding used for binary integers
  • The encoding used for packed-decimal integers
  • The encoding used for floating-point numbers
  • Reserved bits

Each subfield is identified by a bit mask which has 1-bits in the positions corresponding to the subfield, and 0-bits elsewhere. The bits are numbered such that bit 0 is the most significant bit, and bit 31 the least significant bit. The following masks are defined:

    ENIMSK
    Mask for binary-integer encoding.

    This subfield occupies bit positions 28 through 31 within the MDENC field.

    ENDMSK
    Mask for packed-decimal-integer encoding.

    This subfield occupies bit positions 24 through 27 within the MDENC field.

    ENFMSK
    Mask for floating-point encoding.

    This subfield occupies bit positions 20 through 23 within the MDENC field.

    ENRMSK
    Mask for reserved bits.

    This subfield occupies bit positions 0 through 19 within the MDENC field.

Parent topic: IBM i Application Programming Reference (ILE/RPG)