I am trying to compile & run the sample amqsget0.c using Microsoft Visual C++ ver 6. I have MQServer & client installed on my Win2000 PC. I have followed suggestions in Appendix A of Using C++. The code compiles but I get a warning if I use the cl switch. When I run the resultant amqsget0.exe YELLOW.QUEUE I get the first message "Sample AMQSGET0 start" then it does nothing for ~15 seconds and then prints "MQCONN ended with reason code 2058" and ends. If I run the provided amqsget.exe YELLOW.QUEUE it prints out the messages in the Q.
Can anyone suggest what settings I may have set incorrectly.
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
By linking with the mqic32.lib file you have requested that the application be a client application in which case you must specify the location of the queue manager server by means of an MQSERVER environment variable or AMQCHLTAB table AND also set up an incoming SVRCONN channel.
To get your app working, link with mqm.lib instead of mqic32.lib. This will make your app server bound and will work against the local queue manager.
Thanks very much. That worked perfectly.
Someone had told me that I should be using the mqseriestoolscplussamples code insead of mqseriestoolscsamples. Those compiled and worked as expected.
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