CCSID Convert 805 to 1208 in ESQL

peteredm
peteredm used Ask the Experts™
on
Having problems converting a message from an MQ queue (recieved via a transmission queue from another OS) in ESQL within a compute node in the broker.

Attempting this conversion as the message flow throws an exception when the CCSID isn't 1208 but is 850.

I can paste the same message in using the put test message feature in mq and it works as it's written natively.

Thought this ESQL would have worked but still get the same problem
 
CALL CopyEntireMessage();

       -- get the message string        
       DECLARE cMessage CHARACTER CAST(InputRoot.BLOB.BLOB AS CHARACTER ENCODING 546);

       -- set but cast accordinly        
       SET OutputRoot.BLOB.BLOB = CAST (cMessage AS BLOB CCSID 1208);

       -- Set MQMD and Properties values
       SET OutputRoot.MQMD.CodedCharSetId = 1208;
       SET OutputRoot.Properties.CodedCharSetId = 1208;

       SET OutputRoot.MQMD.Encoding = 546;
       SET OutputRoot.Properties.Encoding = 546;

 
Any thoughts?


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Thougths: :-)

1) Define the input CCSID (850) in the cast of the DECLARE statement.

2) Set the conversion option in MQInput node with the CCSID required (1208)

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial