Embedding MQeFields items

Description of how to embed an MQeFields item within another MQeFields item

An MQeFields item can be embedded within another MQeFields item by using the putFields and getFields methods.

The contents of an MQeFields item can be dumped in one of the following forms:

binary
Binary form is normally used to send an MQeFields or MQeMsgObject object through the network. The dump method converts the data to binary. This method returns a binary byte array containing an encoded form of the contents of the item.
Note: This is not Java™ serialization.

When a fixed length array is dumped and the array does not contain any elements (its length is zero), its value is restored as null.

encoded string (Java only)
The string form uses the dumpToString method of the MQeFields item. It requires two parameters, a template and a title. The template is a pattern string showing how the MQeFields item data should be translated, as shown in the following example:
"(#0)#1=#2\r\n" 
where
#0
is the data type (ascii or short, for example)
#1
is the field name
#2
is the string representation of the value
Any other characters are copied unchanged to the output string. The method successfully dumps embedded MQeFields objects to a string, but due to restrictions, the embedded MQeFields data may not be restored using the restoreFromString method.

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.