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 » General IBM MQ Support » MQ Double Byte data Conversion failure

Post new topic  Reply to topic
 MQ Double Byte data Conversion failure « View previous topic :: View next topic » 
Author Message
soumyaudit
PostPosted: Thu Apr 28, 2005 9:39 pm    Post subject: MQ Double Byte data Conversion failure Reply with quote

Newbie

Joined: 28 Apr 2005
Posts: 6

Hi,
Our application gets the response from Mainframe thru MQ. The data is in Japanese language (Double-byte characters). Mainframe sends (does MQPUT) the response with the characterSet 500 (EBCDIC native english instead of the Japanese characterSet 932). Our Application does a MQGET but we find the data to be corrupted. Since the inter-language conversion from English to Japanese DBCS is not supported by MQ, we are trying to convert the English response into the Unicode (with MQGMO_CONVERT option) but we get a MQException Reason code 2190 that says "Converted String too large".
We tried to increase the BufferSize of the message and the MaxLength during the MQGET but we still are getting the same exception.

Would appreciate any inputs on this......
Thanks in advance.

Best Regards,
Udit
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Apr 29, 2005 3:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If the mainframe sets the CCSID to 500, and puts MQFMT_STRING in the MQMD... and the data is not actually 500, then your GET with Convert will mangle the data irreparably.

The CCSID should acurately represent the contents of the data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
soumyaudit
PostPosted: Fri Apr 29, 2005 4:31 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2005
Posts: 6

Thank you very much for your valuable inputs, jefflowrey !
Mainframe sends the response to the Queue Manager having default CCSID as 500. Since the incoming message and default QMgr have the same characterSet, MQ would not try to convert the application data.
1) But, when we do a MQGET with NO CONVERSION, would we still get the Corrupted Data ?
2) If we do MQGET with NO Conversion, set the characterSet of the response to 932(Japanese charSet) and put that message on a different queue and then ask MQ to CONVERT it to the Unicode format ?

Can you please provide any inputs on these two scenarios?
Is there any workaround for such a problem? (Sadly, we cannot change the CCSID of the response at the mainframe side)

Thanks again..!
-Udit
Back to top
View user's profile Send private message
nathanw
PostPosted: Fri Apr 29, 2005 4:46 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

I am assuming that you are using channels to connect to the mainframe etc

If i am wrong then please ignore the follwoing

Surely you can do data conversion within the channel itself between the CCSID?

I have done this myself on projects between windows and CICS so surely this can be activated as well.

Of course I may be wrong
Back to top
View user's profile Send private message MSN Messenger
vennela
PostPosted: Fri Apr 29, 2005 5:48 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Please do not double post. I have deleted your other post.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fjb_saper
PostPosted: Fri Apr 29, 2005 10:43 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If not present at the receiving end check the manuals and build your conversion table.
MQ manuals will tell you how to do that...

Then make sure the messages are put with format MQSTR.

2) at receiving end to a get with convert.

Done.
Back to top
View user's profile Send private message Send e-mail
soumyaudit
PostPosted: Sat Apr 30, 2005 11:31 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2005
Posts: 6

Hi,

nathanw,
As per the requirement, we have to make the changes at the client end, so I'm not too sure if conversions in channel would be the solution which we can implement here.

fjb_saper,
Even if we manage to write the conversion table (from CCSID 500 to CCSID 932 - japanese), and we do MQGET with CONVERT. Here, the application data would be in Japanese which is incorrectly represented by 500 in the response. MQ, in this case, would try to convert from English to Japanese. Hence it would interpret/treat the actual Japanese app data as the English data and would proceed with conversion on this basis. This would lead to data corruption.


With reference to jefflowrey's point ,is there no way we can prevent the data to be corrupted if Mainframe has MQPUT the Response with theincorrect CCSID ?

Now incase MQ's sent the japanese response with CCSID 500 but the Queue manager's default is also 500. And, we do a MQGET with 'CONVERT to 500', MQ should not TRY to convert the Application Data as the requested CCSID and message's CCSID both are the same ? This way can't MQ be tricked ?

Or there's no way out if Mainframe's set the incorrect CharacterSet in the Response message ??

Thanks for the help so far !
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Apr 30, 2005 3:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You need to prevent the Mainframe from specifically setting a CCSID. If they use all the defaults then the message being put in Japanese CCSID 932 will convert to 500 on the put and you convert to what you use on the get.
Make sure the message format is MQSTR.

Now this will need the client doing the put to be CCSID 932. If the client is CCSID 500 and puts japanese (CCSID 932) as message content but pretends to be 500 you are SOL. It's like receiving a message in spanish pretending to be in english. The character set will be translated but the language is certainly not getting translated. That's a whole different story...

Enjoy
Back to top
View user's profile Send private message Send e-mail
soumyaudit
PostPosted: Sun May 01, 2005 9:21 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2005
Posts: 6

Hi,

Yes, Mainframe is NOT setting any hardcoded CCSID. It puts the message with the default characterSet ( Zero or MQQC_Q_MGR) that is the same as that of the Queue Manager.

fjb_saper, what I gather from your suggestion is :
If Mainframe sends the MQSTR Japanese Data, but use the defaults so that the response Message would have app data in japanese but characterSet of English (same as Q Mgr). In this case, the application data WILL NOT be converted and we should get the UNcorrupted response when MQGET is performed.

Please confirm if I have understood it correctly.
Thanks for the valuable inputs......
..........................and thank you for your patience !
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun May 01, 2005 12:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

In order to get the data without conversion:

a) do not specify MQSTR in the message format
b) do not do a get with convert.

Either should be working
Hope this helps...

Back to top
View user's profile Send private message Send e-mail
soumyaudit
PostPosted: Sun May 01, 2005 9:41 pm    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2005
Posts: 6

fjb_saper,

I have practically tested every possible scenario but unfortunately the data gets corrupted unless I specify the appropriate characterSet in the response message.
However, it works perfectly if response is prepared using writeUTF() and then at MQGET we do readUTF(). Here, we need NOT worry about the data conversion and characterSets.....
The worst part is .... we cannot (are not allowed to) make the changes at the Mainframe end so that it prepares the response using writeUTF() instead of writeString().....Life is beautiful !

Anyways.....Thanks for the help.........!
Please let me know if anyone knows any workaround for this problem..

Cheers....Udit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ Double Byte data Conversion failure
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.