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 » amqsbcg giving different output to Java

Post new topic  Reply to topic
 amqsbcg giving different output to Java « View previous topic :: View next topic » 
Author Message
crossland
PostPosted: Fri Dec 10, 2004 6:17 am    Post subject: amqsbcg giving different output to Java Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

My java program is returning different results to amqsbcg for the same message on a queue.

To display the contents of the message, I am using the following:

msgString = message.readString(message.getDataLength());

The output of the message differs from that produced by amqsbcg for higher value characters. For example, amqsbcg returns DC3b where my program returns 25843b. My program is using Integer.toHexString to get these values.

The manual states that readString "reads a string in the codeset identified by the characterSet member variable, and convert it into Unicode."

It also states:

"The coded character set identifier of character data in the application message data. The behavior of the readString, readLine, and writeString methods is altered accordingly. The default value for this field is MQC.MQCCSI_Q_MGR."

Doesn't amqsbcg use the same logic to determine the CCSID? If this was the case, I'd expect amqsbcg and the Java program to be returning the same values.

Any suggestions would be very helpful.

Thanks,

Tim
http://www.solent-design.com/
Back to top
View user's profile Send private message
Nigelg
PostPosted: Fri Dec 10, 2004 6:29 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

amqsbcg does not do data conversion, so the msg data appears as it is. The java app converts the data to Unicode, as you said above.
Back to top
View user's profile Send private message
clindsey
PostPosted: Fri Dec 10, 2004 7:59 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Go to http://www.developer.ibm.com/tech/sampmq.html and download amqsbcg.java. It displays the same results as amqsbcg0.c

Charlie
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 » IBM MQ Java / JMS » amqsbcg giving different output to Java
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.