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 » ImqMessage

Post new topic  Reply to topic
 ImqMessage « View previous topic :: View next topic » 
Author Message
bath
PostPosted: Mon Dec 27, 2004 11:47 am    Post subject: ImqMessage Reply with quote

Apprentice

Joined: 23 Nov 2004
Posts: 29

hello,
Please could you help me on this.
I have writen a small program in VC++ which only open a queue
and put message in the queue.
In my program i defined an ImqMessage variable which hold my message.
as i have a Dialog in my program my message text is stored in a CString variable.
when i put the message in the queue I do not have error. but I can not get this message from the queue.

the code I used to put the message in the is the following:


ImqMessage msg;
CString m_msg;
char buffer[ 256 ];


msg.useEmptyBuffer( buffer, sizeof( buffer ) );
msg.setFormat( MQFMT_STRING );
msg.setApplicationOriginData((ImqString) m_msg);
queue.setOpenOptions( MQOO_OUTPUT | MQOO_INPUT_SHARED | MQOO_INQUIRE);

queue.put(msg);



a)when using it like this is the size of my message text limited to 256?
b)how can i used an unlimited size?

c) when running this program from the server i can connect to the queue manager. but when i run this from the client i can not get the connection.

PS: amqsputc run fine on the client.
thanks for your help
roland
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Dec 27, 2004 12:00 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

bath wrote:

a)when using it like this is the size of my message text limited to 256?

Yes.

bath wrote:

b)how can i used an unlimited size?

Use dynamic memory. Also, make sure your queue is configured to handle large messages. There is a max limit for the message on the queue, which is in GB.

bath wrote:

c) when running this program from the server i can connect to the queue manager. but when i run this from the client i can not get the connection.

You meed to link your program with "MQ Client" libraries so that i will work from remote machine.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
bath
PostPosted: Mon Dec 27, 2004 12:09 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2004
Posts: 29

thank you Kirani,
But i have another question i to link my program with the client library?
thanks
roland
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Dec 27, 2004 12:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Appendix A in Using C++ manual explains what libraries you should use to compile your program. For example, On Windows platform when compiling with Visual C++ you should link with imqb23vn.lib and imqc23vn.lib files. For server application you should link with imqb23vn.lib and imqs23vn.lib files.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » ImqMessage
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.