Posted: Mon May 09, 2005 6:43 am Post subject: CAST INT to BLOB : Encoding problems
Apprentice
Joined: 09 Mar 2004 Posts: 49 Location: Belgium
CAST INTEGER to BLOB: ENCODING problem.
We encountered a problem while trying to set an integer field into an outgoing message.
The problem is the following:
We receive a message as BLOB and after having enriched the message, we have to set the length of the message at the beginning of the message.
To test the enrichment I have created a very simple message flow. The flow gets the message as BLOB and adds an integer at the beginning of the BLOB in a compute node. The integer has to be encoded in function of the destination platform witch is a Little Endian representation.
Here is the code:
DECLARE length INT 7;
-- An integer
SET OutputRoot.BLOB.BLOB = CAST(length AS BLOB ENCODING 546) || InputRoot.BLOB.BLOB;
When the message arrives on the queue, the integer is not converted into a little endian representation but Big Endian. It seems that the encoding parameter has no effect onto the casting.
If we create a message set with two fields, the first is an integer and the second is a string. The integer is correctly converted according to the MQMD encoding.
We use the WBIMB V5 CSD04 _________________ Pierre Richelle
Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum