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 Java / JMS » MQ setting CCSID and Encoding

Post new topic  Reply to topic Goto page Previous  1, 2
 MQ setting CCSID and Encoding « View previous topic :: View next topic » 
Author Message
rekarm01
PostPosted: Sat Feb 12, 2011 6:09 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

fjb_saper wrote:
In Java base you need to make sure that the bitstream you write to the message is in the proper CCSID and then set the CCSID on the message before putting it.

The Java base writeString() method does this automatically, for any supported characterSet:
  • 850 commonly used ASCII codeset
  • 819 the ISO standard ASCII codeset
  • 37 the American EBCDIC codeset
  • 1200 Unicode
  • 1208 UTF-8
It looks like writeString() does not support converting a string to characterSet=500, so the application may have to convert it some other way.
Back to top
View user's profile Send private message
jejo
PostPosted: Tue Feb 15, 2011 9:31 pm    Post subject: Reply with quote

Newbie

Joined: 30 Jan 2011
Posts: 9

Thanks for all your suggestions and replies .. I've solved the issue by using following code for putting message in to the queue
Code:

putMsgOptions = new MQPutMessageOptions();
putMsgOptions.options = MQC.MQPMO_SYNCPOINT;
MQMessage msg=new MQMessage();
msg.characterSet = 500;
msg.encoding = 273;
msg.messageType = MQC.MQMT_REQUEST; // Set the message Type
msg.format = MQC.MQFMT_NONE;
msg.writeString(aMessageData.getMessage());
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sat Feb 19, 2011 8:51 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

jejo wrote:
I've solved the issue by using following code for putting message in to the queue
Code:
...
msg.format = MQC.MQFMT_NONE;
msg.writeString(aMessageData.getMessage());

Hmm. If changing the format from MQFMT_STRING to MQFMT_NONE appears to solve the problem, there might still be something wrong with the consuming application, and that might cause other problems in the future. It would seem to be attempting an unintentional conversion; setting the format to MQFMT_NONE doesn't stop the attempt, but it does prevent it from succeeding.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ setting CCSID and Encoding
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.