Posted: Thu Aug 16, 2007 7:50 am Post subject: Perform data conversion on part of the message
Partisan
Joined: 07 Aug 2001 Posts: 386
I have a simple flow
MQINPUT - compute - MQOUTPUT
These are some ESQL statments in the compute node
CALL CopyMessageHeaders();
:
:
SET OutputRoot.XML.Customer_record.customer_name = InputRoot.MRM.customer;
SET OutputRoot.XML.Customer_record.BrokerName = BrokerName;
:
SET OutputRoot.XML.Customer_record.BLOB = MyBLOBData;
The Incoming message is from OS390 with CCSID of 37
In the output message, everything is still in EBCDIC, which is expected because I copied the message header.
We want to read the output on AIX
so I add
SET OutputRoot.MQMD.CodedCharSetId= 437;
SET OutputRoot.MQMD.Encoding = 546;
This makes the output message readable on AIX. However depending on what is in MyBLOBData, I get an error from time to time saying that it cannot convert the data. I can also understand this.
My question is how can I code my ESQL so that it will only convert the field that I want it to convert (such as customer_name and brokername) and leave the BLOB data alone ? As a matter of fact we do not want to touch the BLOB data until it finally reached the destionation and processed by the application.
Please consider using CDATA sections or base64 encoding on any binary data you wish to include in an otherwise TEXT based XML Document.
In other words, everything you're trying to do here is entirely non-standard and you can't rely on it working properly. _________________ I am *not* the model of the modern major general.
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
I had once faced similar problems as you have:
The solution was in changing the encoding value in the XML declaration section:
Something like:
Code:
<?xml version="1.0" encoding="utf-8"?>
You may not want to use utf-8 but some value like ISO xxxx.
This may or may not solve your problem. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
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