ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Character set 1200 doesn't work whereas 1202 works

Post new topic  Reply to topic Goto page 1, 2  Next
 Character set 1200 doesn't work whereas 1202 works « View previous topic :: View next topic » 
Author Message
pallavi570
PostPosted: Tue Aug 16, 2016 7:05 am    Post subject: Character set 1200 doesn't work whereas 1202 works Reply with quote

Newbie

Joined: 16 Aug 2016
Posts: 5

We had a issue in the .Net application wherein by default character set value was being sent as 1200 to WMQ which wasn't being processed with reason XML Parsing errors at Message Broker end.
Whereas when the set the character set value to 1202 explicity the message is being parsed by WMQ without any issues and is working as expected.

Can anyone please help me in understanding whats the difference between 1200 and 1202 and what worked with 1202.

This is the sample code that we are using:

MQMessage putMessage = new MQMessage();
putMessage.CharacterSet = 1202;
putMessage.WriteString(requestObj.ToString().Trim());
putMessage.Format = MQC.MQFMT_STRING;



Thanks


Last edited by pallavi570 on Tue Aug 16, 2016 7:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 16, 2016 7:09 am    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pallavi570 wrote:
Can anyone please help me in understanding whats the difference between 1200 and 1202 and what worked with 1202.


The Endian position. See here
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pallavi570
PostPosted: Tue Aug 16, 2016 7:16 am    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Newbie

Joined: 16 Aug 2016
Posts: 5

Vitor wrote:
pallavi570 wrote:
Can anyone please help me in understanding whats the difference between 1200 and 1202 and what worked with 1202.


The Endian position. See here


Thanks for your inputs.
But it worked earlier with 1200 as well, but not sure what has been changed now that it only works with 1202.

The only change that I am aware of is the server migration from Windows server 2003 to Windows server 2012 R2, which I believe shouldn't make any difference though.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 16, 2016 7:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

MQ data conversion is dependent on the CCSID of the message itself.

Perhaps the version of .NET changed, which changed the default CCSID, but the MQ Message still had the old CCSID.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
pallavi570
PostPosted: Tue Aug 16, 2016 8:28 am    Post subject: Reply with quote

Newbie

Joined: 16 Aug 2016
Posts: 5

mqjeff wrote:
MQ data conversion is dependent on the CCSID of the message itself.

Perhaps the version of .NET changed, which changed the default CCSID, but the MQ Message still had the old CCSID.


will the default value change based on the .Net framework version.
can you please share any links that you have will help me to get the mapping of the .Net framework version to the default CCSID.

Thanks
Back to top
View user's profile Send private message
tczielke
PostPosted: Tue Aug 16, 2016 8:52 pm    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

The interpretation of CCSID 1200 in MQ is somewhat confusing in what I have observed. IBM does define CCSID 1200 as big endian UTF-16. However, MQ seems to interpret CCSID 1200 as an endian neutral UTF-16 (technically, UCS-2 until MQ 9.0), where the endianness is determined by the Encoding of the message descriptor or the existence of a BOM (Byte-Order-Mark) in the message. From what I remember, the BOM takes precedence over the MD.Encoding, too. Anyway, the point here is that CCSID 1200 in MQ can be somewhat confusing to understand, especially when it does not appear to be clearly documented in the .NET documentation for MQMessage.WriteString -> https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.dev.doc/q111220_.htm

You probably need to ask IBM in a PMR to understand exactly what is happening here.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Aug 18, 2016 12:26 pm    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

pallavi570 wrote:
Can anyone please help me in understanding whats the difference between 1200 and 1202 and what worked with 1202.

Use some sort of debug tool (such as amqsbcg, q, rfhutil, etc.) to examine the message headers, and provide a hex dump of at least the first few lines of the message body. This would help narrow down whether the issue is with MQ/.Net or with the broker.

It might also help to know which versions of MQ and broker "works", and which ones don't.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Thu Aug 18, 2016 5:45 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2491
Location: Melbourne, Australia

mqjeff wrote:
MQ data conversion is dependent on the CCSID of the message itself.

The challenge is to ensure that the CCSID in the MQMD actually represents the character set of Message Data. Many apps put messages blissfully unaware that MQ has chosen the CCSID. In most cases this is benign.
_________________
Glenn
Back to top
View user's profile Send private message
pallavi570
PostPosted: Wed Aug 24, 2016 3:34 am    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Newbie

Joined: 16 Aug 2016
Posts: 5

rekarm01 wrote:
pallavi570 wrote:
Can anyone please help me in understanding whats the difference between 1200 and 1202 and what worked with 1202.

Use some sort of debug tool (such as amqsbcg, q, rfhutil, etc.) to examine the message headers, and provide a hex dump of at least the first few lines of the message body. This would help narrow down whether the issue is with MQ/.Net or with the broker.

It might also help to know which versions of MQ and broker "works", and which ones don't.


I found that the MB has been upgraded from 7.0.0 to 7.0.1, would that have any impact of why it could parse the XML being sent by .Net application earlier with default value of 1200 and not working now after upgrade?
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Aug 25, 2016 12:01 pm    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

pallavi570 wrote:
I found that the MB has been upgraded from 7.0.0 to 7.0.1, ...

There is no MB v7.0.1, so that's not right. There is an MQ v7.0.1, but it might have made more sense to upgrade to a newer version, at least MQ v7.5.0.

pallavi570 wrote:
... would that have any impact of why it could parse the XML being sent by .Net application earlier with default value of 1200 and not working now after upgrade?

No, upgrading MQ from v7.0.0 to v7.0.1 is not likely to affect the behavior of the .Net MQMessage read/write methods or properties.
Back to top
View user's profile Send private message
pallavi570
PostPosted: Thu Aug 25, 2016 10:27 pm    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Newbie

Joined: 16 Aug 2016
Posts: 5

rekarm01 wrote:
pallavi570 wrote:
I found that the MB has been upgraded from 7.0.0 to 7.0.1, ...

There is no MB v7.0.1, so that's not right. There is an MQ v7.0.1, but it might have made more sense to upgrade to a newer version, at least MQ v7.5.0.

pallavi570 wrote:
... would that have any impact of why it could parse the XML being sent by .Net application earlier with default value of 1200 and not working now after upgrade?

No, upgrading MQ from v7.0.0 to v7.0.1 is not likely to affect the behavior of the .Net MQMessage read/write methods or properties.


These are the changes that have been done from MQ/MB side
Will these have any impact on what CCSID needs to be sent and the way it behaves?
Upgrade fix pack level for Message Queue from 7.1.0.6 to 7.1.0.7
Upgrade fix pack level for Message Broker from 7.0.0.7 to 7.0.0.8
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 26, 2016 4:39 am    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pallavi570 wrote:
These are the changes that have been done from MQ/MB side
Will these have any impact on what CCSID needs to be sent and the way it behaves?
Upgrade fix pack level for Message Queue from 7.1.0.6 to 7.1.0.7
Upgrade fix pack level for Message Broker from 7.0.0.7 to 7.0.0.8



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tczielke
PostPosted: Fri Aug 26, 2016 5:40 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
Location: Illinois, USA

I have a recollection of other .NET MQ users reporting similar issues when upgrading the Windows version. It was mentioned in this thread that the Windows verison was upgraded from 2003 to 2012.

Again, I would recommend a PMR. It was not clear to me from IBM's documentation how they interpret a CharacterSet of 1200 for MQMessage.WriteString.

If .NET works like Java, there is probably a data conversion happening in the .NET code that is separate and before any MQ data conversion. You would need to understand from IBM how that data conversion is interpreted for their .NET code and CharacterSet 1200, and if that behavior changed between the listed Windows versions.

Again, CCSID 1200 is somewhat ambiguous. 1200 is documented in IBM documentation (outside of MQ) as UTF-16 big endian. 1200 in MQ has a different interpretation. It is UTF-16 bi-endian (either big or little endian) where the endianness is determined by an optional BOM or the MD.encoding field. If I remember correctly BOM takes precedence over the MD.encoding.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 26, 2016 5:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

tczielke wrote:
I have a recollection of other .NET MQ users reporting similar issues when upgrading the Windows version. It was mentioned in this thread that the Windows verison was upgraded from 2003 to 2012.




Given the last time either MQ & broker changed how they handled CCSIDs (i.e. never), I'd be much more inclined to suspect this.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Fri Aug 26, 2016 5:54 pm    Post subject: Re: Character set 1200 doesn't work whereas 1202 works Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

pallavi570 wrote:
Will these have any impact on what CCSID needs to be sent and the way it behaves?
Upgrade fix pack level for Message Queue from 7.1.0.6 to 7.1.0.7
Upgrade fix pack level for Message Broker from 7.0.0.7 to 7.0.0.8

IBM provides a list of fixes for WebSphere MQ v7.1 and for WebSphere Message Broker v7.0.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » Character set 1200 doesn't work whereas 1202 works
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.