There are two different ways to discover that data has arrived in a MQ queue. Either you code a program that from time to time checks whether new data has arrived. Or you let MQ do the work by defining a trigger on the queue. The trigger will then start a program that reads the data on the queue. The most common way for a trigger to work is by starting a CICS transaction.
Those of you who has already been working with triggers starting CICS transactions probably knows a lot about the problems they can cause, though it is my impression that CICS triggers has become more stable through the years. I will not dwell on this rather large subject in this tip. Instead I want to tell you about how CICS triggering works and how to find the connection between your MQ queue and the CICS system where the corresponding CICS transaction will be executed.
On the definition of a MQ queue you must define the name of a trigger queue if you want a trigger on the queue. When a MQPUT puts data on the queue and the trigger rules will fire a trigger then MQ writes a message on the trigger queue. The MQ system hosting the trigger queue must be connected to at least one CICS system and this CICS system must be up and running to be able to execute the CICS transaction that gets started. On the CICS system there is a running transaction called CKTI which constantly monitors the trigger queue in the same way as if you had made your own program to monitor a MQ queue. When data arrives on the trigger queue, CKTI starts the transaction that you have defined on a MQ process definition linked to your MQ queue. When your CICS transaction has been started it is the responsibility of this transaction to process the data in your MQ queue.
Some installations have more than plenty of CICS systems running and it can be quite difficult to find the connection between your MQ queue and the CICS system executing the corresponding CICS transaction. One way is to find the trigger queue name on your MQ queue definition and then scan the sysout from all of your CICS systems to find the trigger queue name. The trigger queue name is written to sysout at CICS startup and is located using a FIND 'INITQ=' FIRST command. The located name is activated at CICS startup, but may be changed using the CKQC transaction while CICS is running. This happens very rarely.
It is of course quite time consuming to walk through the sysout of all CICS systems and luckily you can use a far more simple method. A trigger queue is a local MQ queue just like all other local MQ queues. Therefore you can find out who is using it by using the approach described in week 40/2005. This approach will simply tell you which CICS system that your CICS transaction will be executed on right now.