Author |
Message
|
ashokkumar907 |
Posted: Fri Jul 27, 2018 3:21 am Post subject: From which trigger Queue my program is triggered. |
|
|
Newbie
Joined: 27 Jul 2018 Posts: 1
|
I am doing a COBOL development using MQ as middle ware, I am having two INITQ(INITQ1 and INITQ2) which will trigger same trigger COBOL program.
I need to differentiate from which INITQ queue my COBOL program has triggers. Since INITQ1 and INITQ2 triggers same COBOL program I am confused from which queue my program is triggered.
Please give me a solution for this program. |
|
Back to top |
|
 |
tczielke |
Posted: Fri Jul 27, 2018 3:59 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
The amqminqx.cbl sample that comes in the sample directory (e.g. /opt/mqm/samp/amqminqx.cbl) gives an example of a COBOL program that is triggered. Basically, the queue name that triggered you is passed into your program through a TRIGGER data structure. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jul 28, 2018 7:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Which makes the question of the OP irrevelant.
It doesn't matter which INITQ ran the trigger, it matters which queue caused the trigger. The INITQ (although it has to exist) is irrevelant...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tczielke |
Posted: Sun Jul 29, 2018 4:35 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
I was making an assumption there that terms were being mixed a little and the OP really wanted to get the name of the queue that is set up for triggering and caused the trigger to happen. If the OP really wants the name of the INITQ (e.g. SYSTEM.DEFAULT.INITIATION.QUEUE), that is involved within the triggering process, then the sample I mentioned would not help. _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 29, 2018 8:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tczielke wrote: |
I was making an assumption there that terms were being mixed a little and the OP really wanted to get the name of the queue that is set up for triggering and caused the trigger to happen. If the OP really wants the name of the INITQ (e.g. SYSTEM.DEFAULT.INITIATION.QUEUE), that is involved within the triggering process, then the sample I mentioned would not help. |
Sure but that would make things even easier
Code: |
dis ql(*) where (initq eq X.Y.Z) |
unless the OP dynamically changes the set up of the queue  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tczielke |
Posted: Sun Jul 29, 2018 9:02 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
exerk wrote: |
tczielke wrote: |
I was making an assumption there that terms were being mixed a little and the OP really wanted to get the name of the queue that is set up for triggering and caused the trigger to happen. If the OP really wants the name of the INITQ (e.g. SYSTEM.DEFAULT.INITIATION.QUEUE), that is involved within the triggering process, then the sample I mentioned would not help. |
In triplicate?  |
That is odd! I only remember hitting the Submit button once! _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
|