Author |
Message
|
deceiver |
Posted: Fri Jun 04, 2004 3:27 am Post subject: mrm charset conversion |
|
|
Newbie
Joined: 04 Jun 2004 Posts: 4
|
newbie question: how do i cast one charset to another using esql?
i have tried this but i know the syntax is off
CALL CopyEntireMessage();
DECLARE I INTEGER 2;
DECLARE J INTEGER CARDINALITY(InputRoot.MRM.Record[]);
WHILE I <= J DO
SET OutputRoot.MRM.Record[I-1] = CAST(InputRoot.MRM.Record[I] AS CCSID 819);
SET I = I + 1;
END WHILE; |
|
Back to top |
|
 |
fazz |
Posted: Fri Jun 04, 2004 4:07 am Post subject: |
|
|
 Centurion
Joined: 20 Feb 2004 Posts: 144 Location: England
|
You could set the MQMD elements...
SET OutputRoot.MQMD.Encoding = ?;
SET OutputRoot.MQMD.CodedCharSetId = ?;
..and let MQ handle the conversion from one code page set to another. |
|
Back to top |
|
 |
deceiver |
Posted: Fri Jun 04, 2004 8:53 am Post subject: but what if |
|
|
Newbie
Joined: 04 Jun 2004 Posts: 4
|
I still want to do all my conversion in using CAST. Is my code totally wrong or..?
Being a newbie i tried setting the MQMD properties but that only changes headers and not the payload. I put a trace right after the compute node and nothing in the payload has changed. By the way Where/How in MQ do you set the conversion you suggest? Is it in some properties somewhere?
easy-to-follow-answer answer please =) |
|
Back to top |
|
 |
EddieA |
Posted: Fri Jun 04, 2004 9:58 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
I still want to do all my conversion in using CAST |
Why?
Quote: |
I put a trace right after the compute node and nothing in the payload has changed |
That's because inside WMQI everything is held as unicode (well, except BLOBs), and is only converted to the correct CCSID when the message is converted to wire format. Which is, usually, when it is written to the output queue. Of BLOBed
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
deceiver |
Posted: Fri Jun 04, 2004 10:26 am Post subject: |
|
|
Newbie
Joined: 04 Jun 2004 Posts: 4
|
ok. I give up =) No more cast for me. I just wanted to know cause I want to learn.
To sum everything up. The best for me is to
1. set the convert option in MQinput to ccsid 819
2. set the MQMD properties as specified in the reply above
That will take care of everything.
Just curious, why do i need to set the MQMD? Isnt it enough just to use the conversion option in MQinput? |
|
Back to top |
|
 |
|