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 » Putting a number as a message

Post new topic  Reply to topic
 Putting a number as a message « View previous topic :: View next topic » 
Author Message
nNumber
PostPosted: Tue Feb 17, 2009 5:41 am    Post subject: Putting a number as a message Reply with quote

Newbie

Joined: 17 Feb 2009
Posts: 2

Hello,

I'm trying to do a basic put\get program in c\c++ as a client and get\put program in java, and need to put an integer message in the queue (in the client prog). What I did so far is used itoa() to transform the number to char*, however that isn't good for me since the server app uses readInt (java), and reads the integer values of the chars.

Is there an easy way i can send the int as a message? (converting etc...). If not at the client side, is there something i can do in the server side? (I rather change the client than the server).

I'll appreciate any help given.
Me.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 17, 2009 5:49 am    Post subject: Re: Putting a number as a message Reply with quote

Grand High Poobah

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

nNumber wrote:
What I did so far is used itoa() to transform the number to char*, however that isn't good for me since the server app uses readInt (java), and reads the integer values of the chars.


Why? If the receiving application wants an integer value, why not send an integer value?

nNumber wrote:
Is there an easy way i can send the int as a message?


Look up the convert options supplied by the product. They're in the infocentre. Be aware WMQ works on the general principle "receiver makes good".

FWIW most numbers tend to be sent as numeric character because it's easier to read by humans when you're problem solving, it's easier to explain to management code page translation than it is to explain endlian incompatibility and you're not charged for bandwidth these days!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nNumber
PostPosted: Tue Feb 17, 2009 6:22 am    Post subject: Reply with quote

Newbie

Joined: 17 Feb 2009
Posts: 2

Thank you very much, i got it working...

Ciao
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 API Support » Putting a number as a message
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.