Putting data into the message object

To put data into a fields object, use the following fields API calls:

MQeFieldsPut() is the most basic API and its use is described here. The other functions are described in the


Advanced MQeFields APIs section of this document.

Every piece of data put into an MQeFields object has a WebSphere MQ Everyplace field type associated with it. The type gives hints to the WebSphere MQ Everyplace system on how to handle the message when it passes between different host system (for example between a big-endian and a little-endian system). In other words, the WebSphere MQ Everyplace system converts a primitive data type into a host-friendly format so that the correct integer value is retrieved from the MQeFields object regardless of the format of the host system.

Table 1 shows the data types that are available in WebSphere MQ Everyplace

Table 1. MQeFields object data types

Type
Data Representation
MQE_TYPE_UNTYPED 1 byte (8 bits)
MQE_TYPE_ASCII 1 byte (8 bits)
MQE_TYPE_UNICODE 2 bytes (16 bits)
MQE_TYPE_BOOLEAN 1 byte (8 bits)
MQE_TYPE_BYTE 1 byte (8 bits)
MQE_TYPE_SHORT 2 bytes (16 bits)
MQE_TYPE_INT 4 bytes (32 bits)
MQE_TYPE_LONG 4 bytes (32 bits)
MQE_TYPE_FLOAT 4 bytes (32 bits)
MQE_TYPE_DOUBLE 8 bytes (64 bits)
MQE_TYPE_ARRAYELEMENTS 4 bytes (32 bits)
MQE_TYPE_FIELDS (a handle) (32 bits)



© IBM Corporation 2002. All Rights Reserved