Author |
Message
|
marksinnott |
Posted: Fri Jan 09, 2004 5:48 am Post subject: MQ on AIX / WAS Cluster & VB |
|
|
Novice
Joined: 06 Oct 2003 Posts: 21
|
Hi
Can anyone help me out.
We have a OS390 queue manager talking to a WAS AIX environment. The WAS AIX side is a cluster of 2 servers.
The servers have a queue manager MLAIXXX01 and MLAIXXX02
I have a vb application that needs to listen to this queue managers.
Do i have yo run two VB apps listening to the two different managers if so how do i set the MQSERVER client variable in the VB apps to look at each manager.
Im sure there is a better way to tell VB this is a MQ cluster and not need to run two VB apps etc.
Can anyone help??????????? |
|
Back to top |
|
 |
JasonE |
Posted: Fri Jan 09, 2004 6:20 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Even in a clustered environment, you can only MQGET from a local instance of a queue, so if the requirement is to get messages of queues, then you can either have two vb apps or one connecting to both qmgrs on two threads (On windows you can do this, others you cant) or on one thread but one at a time.
Dont use MQSERVER - Look at the syntax for MQCONNX where you build a client channel definition and pass it in, OR look at client channel definitions and use the MQCHLLIB/TAB environment variables. Both ways enable you to connect from one app to different remote qmgrs in client bindings. |
|
Back to top |
|
 |
marksinnott |
Posted: Wed Jan 21, 2004 6:19 am Post subject: |
|
|
Novice
Joined: 06 Oct 2003 Posts: 21
|
Hi Thanks for your reply which would seem to have answered the problem.
Apols for the delay in responding but I have been on vacation.
However can you Help me out, im using MQAx200.dll which is fine and use code like
Set MQSess = New MQSession
Set QMgr = MQSess.AccessQueueManager("")
Set InputQueue = QMgr.AccessQueue("XXX.MY.quUE.REPLY", MQOO_INPUT_SHARED)
So the VB code uses the environment variable MQServer to resolve the queue
I set the MQSERVER environment varaiable to and it works fine CLIENT.MTZXBR01/TCP/MQSERVER(1415)
So I tried using in the VB prog
Set QMgr = MQSess.AccessQueueManager("CLIENT.MTAXBR01/TCP/IEHIBU06(1415)")
but get a 2058 MQRC_Q_MGR_NAME_ERROR
I dont see the method MQCONNX or MQCONN avaialable drom this dll Any ideas ?? |
|
Back to top |
|
 |
JasonE |
Posted: Wed Jan 21, 2004 7:13 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Quote: |
The ActiveX class use a method known as 'late binding' when deciding which MQSeries API module (either MQM.dll or MQIC32.dll) to use. This mathod takes the approach that, if MQM.dll is present in the path, the application must be running as a server side application and as such uses MQM.dll otherwise it assumes that the application was meant to run as a client side application and uses MQIC32.dll.
This is documented on the AccessQueueManager method of the MQSession class here in the MQSeries for Windows NT V5R1 manual 'Using the Component Object Model Interface'.
This can be overridden using the undocumented environment variable, GMQ_MQ_LIB which should be set to the full path of the dll to use (either MQIC32.dll or MQM.dll). |
I suspect this is your problem, if you have both server and client installed on the same machine as it will default to using the server bindings |
|
Back to top |
|
 |
marksinnott |
Posted: Wed Jan 21, 2004 7:36 am Post subject: |
|
|
Novice
Joined: 06 Oct 2003 Posts: 21
|
Hi Thanks for your reply.
Im running an NT client and VB and am trying to talk to different AIX servers. The VB app is using MQAX200.DLL.
Ive managed to put the queuemanager name in
Set QMgr = MQSess.AccessQueueManager("MZZZBR01")
which corresponds to the MQSERVER env variable
but I dont know how to specify the server name etc
If I change the above to another queue manager which differs from the MQSERVER i get a 2058.
This may be something to do with MQCHLIB but dont know where they are specified.
Thanks |
|
Back to top |
|
 |
JasonE |
Posted: Wed Jan 21, 2004 8:28 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Yes, MQSERVER can only identify one destination. Look at defining CLNTCONN channels, and then you remove MQSERVER and set up MQCHLLIB (path) and MQCHLTAB (filename) to point to the client channel table definition. Then when you mqconn to a server name, that name is looked up in that table and the appropriate channel table used.
So to sum up - 2x CLNTCONN definitions *MATCHING* the same names as the SVRCONNS on the 2 qmgrs, but with different qmgr names. You define them both on one (either) of the qmgrs, then ftp in binary mode the amqclchl.tab (From memory, I think thats the name) onto the client, and set up the env vars to point to it.
See the Clients manual (Or intercomms, not sure which) for details on using client conn tables. |
|
Back to top |
|
 |
|