Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to connect MQClient to multiple QueueManagers with NT? 1

Status
Not open for further replies.

ClientBH

Technical User
Aug 13, 2001
10
0
0
AR
My application uses the MQSeries Client API with Microsoft Visual C++ in an NT environment.
I can connect to a Queue Manager setting the environment variable MQCHLLIB to the path in the queue manager where the AMQCLCHL.TAB file is located.
Now I need my application to connect to multiple Queue Managers, even physically located in different machines (therefore, different IPs and so on).
How should I configure then the environment variables to be able to see all the different queue managers from my application at the same time? Is there any other way to connect, appart from using the environment variables, that I should use for my purpose?
Thank you very much in advance.
 
To connect to multiple MQSeries queue managers, we've successfully used the the ImqChannel object, which is available with MQSeries client V5.2, in lieu of the MQSERVER environmental variable. In particular, by setting the the ChannelName, TransportType, and ConnectionName properties, we have successfully connected to multiple queue managers on different platforms. Good luck!
 
Thanks Jim, you are absolutely right.

But, lamentably I am using MQSeries Client v5.1 with C++.
I even tried using the setConnectOptions method of the ImqQueueManager class, passing a MQCNO structure, but my version seems not to support the MQCNO_VERSION_2 (for field MQCNO.Version), therefore, I could not use the field MQCNO.ClientConnPtr to pass a MQCD structure to it.

Then, with MQSeries Client v5.1 with C++ I really don't see any other way to configure during run time the channel options!

Thank you very much for your help to anyone who might be able to give me a hand with this.
 
Yes, we also experienced the version constraints you described; the 5.1 C API supports the necessary functions, but not the 5.1 C++ libraries.

Can I suggest that you consider downloading and installing the 5.2 client for NT available at no charge from IBM's web site ( We've seen no difficulty as of yet connecting to 5.1 servers using the 5.2 client.

If one of your 5.1 servers is on the same NT box as your application, you might try the 60-day evaluation copy of MQSeries 5.2 for NT, which is also available from IBM's site ( This would permit you at least to confirm the feasability of your application and perhaps make a case for the benefits of upgrading.

Good luck!
 
Thank you very much Jim Donohoe.
Your advise is very useful to me.
I am now gathering opinions about the compatibilty between MQSeries Client V5.2 for NT with any MQSeries Server V5.1 in another thread.
Specially, I'd like to know wheather IBM guarantees full compatibility in this case. If you have any specific notice from IBM about this, please let me know too.
Thanks again!!
 
I am trying to use the amqclchl.tab to connect to a queue manager/queue. I'm using MQ Series 5.3. I have MQ installed on the same machine as my application (written in C++). I have my environment variables, MQCHLLIB and MQCHLTAB, set correctly. I do not have a MQSERVER variable set.
Basically I've created my own .dll to encompass all the MQ work, (connecting and opening of qmgr/queues). I have gotten the code to work by defining both the queue manager and queue and can put messages successfully.
However, if I don't define the queue manager it should pick it up from the .tab file. This is not working....I get the 2059 error. I've checked my listener port to verify its 1414. I've defined my queue mgr locally with 2 local queues, non-clustered and set up a server connection channel and a client channel. I'm not sure what else to check. Does anyone know of any MQ coding options that I would need to set to read the .tab file or is it strictly a setup issue???
 
ClientBH

I have mismatched MQ version, between clients and servers, and server to server in every way imaginable and between different hardware platforms, without a problem.

If you need to find IBM documentation, you'll have to find it yourself.
 
kenc475

You should start your own thread. Anyways. I have only used MQCHLTAB to connect OS2 and Windows Clients to Mulitple IBM mainframes. MQCHLTAB can be difficult to get right.

Don't knock yourself out, use the envirnment variable, that is the easiest and may I say notmal way to do what you are trying to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top