The message is not translated at all through this step.
The message is not translated at all through this step.
String value = MQemsg.GetUnicode(fieldname)
Byte value = MQemsg.getByte(fieldName)
Unicode values in the MQ message are translated from big-endian to little-endian, and vice versa, as required. Byte values in the MQ message are translated from big-endian to little-endian, and vice versa, as required. The field that was created using writeString() is translated as the message is put to MQ, using conversion routines inside the MQ Classes for Java. ASCII data should remain ASCII data regardless of the character set conversions performed. The translations done during this step depend on the code page of the message, the CCSID of the sending MQ Classes for Java client connection, and the CCSID of the receiving MQ server connection.
If the message contains a unicode string, the application must deal with that string as a unicode string, or else convert it into some other format (UTF8 , for example). If the message contains a byte string, the application may use the bytes as it is (raw data). If the message contains a string, it is read from the message, and may be converted to a different data format as required by the application. This conversion is dependent on the codeset value in the characterSet header field. Java classes provide this automatically.
If you have an MQe application, and wish to convey character-related data from MQe to MQ, your choice of method is determined largely by the data you wish to convey:
Parent topic: Configuring bridge/gateway resources