|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
AS/400 with 2 qmgrs - get msg from correct qmgr |
« View previous topic :: View next topic » |
Author |
Message
|
obrienp |
Posted: Mon Nov 04, 2002 11:49 am Post subject: AS/400 with 2 qmgrs - get msg from correct qmgr |
|
|
 Newbie
Joined: 09 Jul 2002 Posts: 6
|
We are running V5R2 on an as/400 and have 2 qmgrs defined - one for test and one for QA. The same set of triggered queues is defined under each qmgr. A trigger monitor is set up and the process associated with each queue points to the appropriate library containing the cobol program. The program is batch cobol. The problem is the program will only get messages out of the queues associated with the default qmgr (which is test). Is there a way to dynamically get the qmgr name when the program is started up by the trigger monitor? Any help would be appreciated.
PJ
p.s. While I am a cobol programmer, I've am new to the as/400 and I rarely work on batch programs. |
|
Back to top |
|
 |
jc_squire |
Posted: Mon Nov 04, 2002 5:55 pm Post subject: |
|
|
 Centurion
Joined: 14 Apr 2002 Posts: 105 Location: New Zealand
|
I am not too familiar with AS400 (or cobol) but I believe you can either connect to the default qmgr or a specific qmgr.
your test qmgr is probably the default qmgr - this can be changed in the mqs.ini file
alternatively specify the qmgr name in the MQCONN or MQCONNX call if you are using the MQI
Regards _________________ J C Squire
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
mgrabinski |
Posted: Mon Nov 04, 2002 10:20 pm Post subject: |
|
|
Master
Joined: 16 Oct 2001 Posts: 246 Location: Katowice, Poland
|
Hi
Look the other way around at your problem. An MQ message doesn't arrive at a machine. It arrives at a queue manager. It doesn't matter that you have 2 queue managers on a single machine. They are seen as separate entities from MQ point of view. So in order to use the other manager's set of queues, you need to send messages to that manager. You do it either from a local application connected your manager, or from a remote manager that has been properly configured to communicate with your queue manager.
Notice, that 'remote queue manager' maybe your test manager, located on the same machine! _________________ Marcin Grabinski <>< |
|
Back to top |
|
 |
obrienp |
Posted: Tue Nov 05, 2002 6:00 am Post subject: |
|
|
 Newbie
Joined: 09 Jul 2002 Posts: 6
|
The messages are getting to the correct que/qmgr and they are triggering the program. However, the program tries to read the queue for the default qmgr. The program was originally developed for version 4.2. Under that version, there was only one qmgr and the trigger monitor was a separate program which did the connect / disconnect. I think what I'm looking for is a way to get the qmgr name from the trigger message, if it is possible, so that the program can connect to the correct qmgr dynamically. I've been unable to find any documentation on how to do it. |
|
Back to top |
|
 |
ramires |
Posted: Tue Nov 05, 2002 7:26 am Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
Hi,
when a trigger happens, a MQTMC is passed to the triggered program, in this structures the queue name and queue manager name are included.
You've to read tha structure and connect to the correct queue manager
Hope this helps
joao |
|
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
|
|
|
|