|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Running C+ program as client |
« View previous topic :: View next topic » |
Author |
Message
|
donthomas |
Posted: Fri Oct 18, 2002 6:27 am Post subject: Running C+ program as client |
|
|
Novice
Joined: 28 Nov 2001 Posts: 23 Location: EDS, Pittsburgh, PA
|
Does anybody have any experience running a C+ program that does a client connection to a queue manager using the MQSERVER parameter? In VB you use the MQTYPE variable to identify the connection type (server/client) and then set an environment variable on the workstation, but how do you go about getting a C+ program to establish a client connectrion to a remote queue manager? |
|
Back to top |
|
 |
clindsey |
Posted: Fri Oct 18, 2002 7:25 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
In C++, the bindings mode is determined by the libraries you link with. Link with imqb23vn.lib + imqs23vn.lib (server) or imqc23vn.lib (client).
Charlie |
|
Back to top |
|
 |
donthomas |
Posted: Fri Oct 18, 2002 7:41 am Post subject: |
|
|
Novice
Joined: 28 Nov 2001 Posts: 23 Location: EDS, Pittsburgh, PA
|
Thanks Charlie. One more question in you would, how then do you let the program know what client channel to use? Do you still need to set the MQSERVER on the client workstation or is this passed into the program as a parameter? |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Oct 18, 2002 8:30 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You still use the MQSERVER environment variable to point to the Qmgr.
Although, the imqsput.cpp sample actually parses a channel name as an input parameter that it uses to build a channel reference for the qmgr that it wants to connect to. You might want to look at this as well. |
|
Back to top |
|
 |
donthomas |
Posted: Fri Oct 18, 2002 9:21 am Post subject: |
|
|
Novice
Joined: 28 Nov 2001 Posts: 23 Location: EDS, Pittsburgh, PA
|
Thanks. I saw that bit of code and that's what had me wondering which way to go. _________________ Don Thomas
412-203-3539 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|