View previous topic :: View next topic |
Author |
Message |
tomehta Beginner

Joined: 19 Dec 2003 Posts: 17 Topics: 5
|
Posted: Sat Nov 13, 2004 8:49 am Post subject: Multiple Triggers In MQ |
|
|
Hi All,
We are facing a problem of multiple triggers, one CICS application is putting the messages in MQ and other is getting it. Both are differnt transactions. The Q trigger level is one and the queue is opened as shared. The getting of messages is with a wait interval of 2sec. The Q manager is having the trigger interval of 99999999 microseconds.
But multiple instances of the trasactions(which are getting) are created. The handles are in the syncpoint control. The syncpoint done is before closing the Queue. What can be reason for the multiple triggers? Please help.  |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sun Nov 14, 2004 7:33 pm Post subject: |
|
|
tomehta,
How is the trigger defined ? Is the trigger type EVERY or is it FIRST?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
tomehta Beginner

Joined: 19 Dec 2003 Posts: 17 Topics: 5
|
Posted: Tue Nov 16, 2004 11:38 am Post subject: |
|
|
Its defined as first only. |
|
Back to top |
|
 |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Wed Nov 17, 2004 6:25 pm Post subject: |
|
|
tomehta,
Please try using the SYNCPOINT after reading the message from the queue. _________________ Thanks,
Jeba
(Known is a drop Unknown is an ocean) |
|
Back to top |
|
 |
tomehta Beginner

Joined: 19 Dec 2003 Posts: 17 Topics: 5
|
Posted: Fri Nov 19, 2004 9:08 am Post subject: |
|
|
Hi Jeba
You mean to say that I should get the message with SYNCPOINT get message options and then take a syncpoint (EXEC CICS SYNCPOINT) after wards for each message?
Regards |
|
Back to top |
|
 |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Fri Nov 19, 2004 10:37 am Post subject: |
|
|
tomehta,
In our shop we had the same kind of problem during testing period in test region. When a message is put into a particular queue that is defined as TRIGGER FIRST, the corresponding program will be triggered. Once the message is read, due to some problem/issues in the application, the program might abend, which will cause the message to be backed out in to the same queue. So the same program will be triggered again since the queue depth varies from 0 to 1. This will keep on going.
To avoid this issue, we can add EXEC CICS SYNCPOINT after the message read. So the message will not be backed out to the same queue even if the program abends.
Is this problem happening in test region or production?
Are you experiencing a problem other than this? _________________ Thanks,
Jeba
(Known is a drop Unknown is an ocean) |
|
Back to top |
|
 |
tomehta Beginner

Joined: 19 Dec 2003 Posts: 17 Topics: 5
|
Posted: Sat Nov 20, 2004 4:15 am Post subject: |
|
|
Jeba,
The problem is in test region only, but apart from reading from MQ that task is doing inserts and updates in DB2. The tasks is not abending. The output of the task is correct,but in CICS I am able to see multiple instances of the task. When the wait option is given the no of multiple instances are less but not altogether removed.
That is true trigger is generated when the MQ changes from 0 to 1.
I have a doubt.
What will happen when the task has read from the MQ(syncpoint taken) but it has not finsished its work in DB2, and another messages is put into MQ. Since MQ is empty it will again generate a trigger message and another instance of transaction is created. The other instance of task still in db2.
regards |
|
Back to top |
|
 |
Jeba Beginner

Joined: 02 Dec 2002 Posts: 48 Topics: 9 Location: Columbus, GA
|
Posted: Mon Nov 22, 2004 10:46 pm Post subject: |
|
|
Tomehta,
You can avoid the multiple instances issue by limiting this program's function to just read the message and start a new transaction (new program) to process the message. ( accessing DB2 and etc )
Yes you are right. The new message triggers the program again and another instance of transaction will be created. _________________ Thanks,
Jeba
(Known is a drop Unknown is an ocean) |
|
Back to top |
|
 |
|
|