Author |
Message
|
busy_chap |
Posted: Mon Feb 16, 2009 3:27 pm Post subject: CCSID Issue |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
Hi,
Our broker runs on AIX . MQ 6.0 and MQSI 6.0
We are getting é characters in our data from a source system.
Example:
SET InputRoot.XMLNS.DOMSG.Value = 'savioére';
SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
I see an error while it comes to this ESQL statement:
SET OutputRoot.XMLNS.{soapenv}:Envelope.{soapenv}:Body.{tns}:executeBOMessage.String_3.(XML.CDataSection) = CAST(ASBITSTREAM(InputRoot.XMLNS.DOMSG.Value) AS CHARACTER CCSID 437);
The message is sent to message broker with code page 819 and the error that I see is something like this:
SetSoapHeader <BR>SetSoapHeader.main <BR>34.9 <BR>SET OutputRoot.XMLNS.{soapenv}:Envelope.{soapenv}:Body.{tns}:executeBOMessage.String_3.(XML.CDataSection)*:* = CAST(ASBITSTREAM(InputRoot.XMLNS.DOMSG.Value) AS CHARACTER CCSID 437); <BR>0398 <BR>003c00430061006e006400690064006100740065003e003c00430061006e006400690064006100740065005200
Can someone please tell me where are we going wrong? |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Feb 16, 2009 4:08 pm Post subject: Re: CCSID Issue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
First, consider using the XMLNSC parser (with associated XMLNSC constants); it's more efficient than XMLNS.
Second, run a usertrace, and post the entire error message, including the BIP error number.
Third, please explain what the statement in question is supposed to do. The ASBITSTREAM() function is used incorrectly, but without more information, it's difficult to suggest an alternate expression. |
|
Back to top |
|
 |
busy_chap |
Posted: Tue Feb 17, 2009 9:09 am Post subject: |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
Thanks for your reply. Here is the trace.
RecoverableException BIP2230E: Error detected whilst processing a message in node 'com.mp.do.dt.SendToDO.SendToDO.SetSoapHeader'.
The message broker detected an error whilst processing a message in node 'com.mp.do.dt.SendToDO.SendToDO.SetSoapHeader'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2009-02-17 10:25:32.727344 8225 RecoverableException BIP2488E: ('com.mp.do.dt.SendToDO.SendToDO_SetSoapHeader.main', '35.9') Error detected whilst executing the SQL statement ''SET OutputRoot.XMLNS.{soapenv}:Envelope.{soapenv}:Body.{tns}:executeBOMessage.String_3.(XML.CDataSection)*:* = CAST(ASBITSTREAM(InputRoot.XMLNS.SendToDO.Value) AS CHARACTER CCSID 819);''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2009-02-17 10:25:32.727352 8225 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2009-02-17 10:25:32.727382 8225 RecoverableException BIP2136E: Source character ''251c'' in cannot be converted from unicode to codepage '819'.
The source character is an invalid code point within the given codepage.
Correct the application or message flow that generated the message to ensure that all data within the message can be represented in the target codepage.
Last edited by busy_chap on Fri Feb 20, 2009 9:15 pm; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 17, 2009 9:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please do us a favour by using [code] tags for posting code. That was almost unreadable.
You are CASTing the result of ASBITSTREAM into code page 819, and putting the result into a CHARACTER field in the message tree.
You should know that all character data in the message tree is in code page 1200 ( UTF-16 ).
That's a basic principle of message broker - all data in the tree is in logical form. The parser ( XMLNS in your case ) converts the
tree to its physical form when it needs to. Your mistake is that you are trying
to do the parser's job.
It might help if you tell us what you are trying to achieve. Maybe there's an easier way... |
|
Back to top |
|
 |
busy_chap |
Posted: Tue Feb 17, 2009 10:21 am Post subject: |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
Hi,
Sorry about the logs. From next time I will keep in mindto paste itin a readable format.
All I want to achieve is that those special characters should be handled by message broker and the output msg is created.
I even tried to use
SET OutputRoot.XMLNS.{soapenv}:Envelope.{soapenv}:Body.{tns}:executeBOMessage.String_3.(XML.CDataSection) = CAST(ASBITSTREAM(InputRoot.XMLNS.DOMSG.Value) AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId);
but no luck. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 17, 2009 11:31 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
From next time I will keep in mind to paste it in a readable format. |
To avoid a repeat, please use the Preview button in future. Yes, it takes extra time to post tidily.
You seem to have missed my point. You are still putting character data into the message tree in the wrong code page (unless InputRoot.MQMD.CodedCharSetId happens to be UTF-16 ).
Please re-read my earlier post. If you don't understand it, feel free to ask for clarification. |
|
Back to top |
|
 |
busy_chap |
Posted: Fri Feb 20, 2009 10:27 am Post subject: |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
I used InputRoot.MQMD.CodedCharSetId ... as the CCSID and the CAST problem is solved. |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Feb 20, 2009 7:50 pm Post subject: Re: CCSID Issue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
busy_chap wrote: |
kimbert wrote: |
Please do us a favour by using [code] tags for posting code. That was almost unreadable. |
Sorry about the logs. From next time I will keep in mind to paste it in a readable format. |
Actually, it's not too late to do that this time. There should be an 'Edit' button off to the upper right of the post in question.
Please do another favor by either wrapping or truncating long lines; that makes it much easier for other people to reply to your posts, and to read the replies that follow.
[edit]Thanks.[/edit]
busy_chap wrote: |
I used InputRoot.MQMD.CodedCharSetId ... as the CCSID and the CAST problem is solved. |
InputRoot.Properties.CodedCharSetId is often a better choice, especially for message flows that don't use MQMD headers.
Last edited by rekarm01 on Fri Feb 20, 2009 9:25 pm; edited 1 time in total |
|
Back to top |
|
 |
busy_chap |
Posted: Fri Feb 20, 2009 9:17 pm Post subject: |
|
|
Acolyte
Joined: 18 May 2006 Posts: 69
|
Hi rekarm... changed the logs as peryour suggestion. i didn't know that there was a edit button there. Thanks for letting me know. |
|
Back to top |
|
 |
|