MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple Triggers In MQ

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
tomehta
Beginner


Joined: 19 Dec 2003
Posts: 17
Topics: 5

PostPosted: Sat Nov 13, 2004 8:49 am    Post subject: Multiple Triggers In MQ Reply with quote

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. Question
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Nov 14, 2004 7:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
tomehta
Beginner


Joined: 19 Dec 2003
Posts: 17
Topics: 5

PostPosted: Tue Nov 16, 2004 11:38 am    Post subject: Reply with quote

Its defined as first only.
Back to top
View user's profile Send private message
Jeba
Beginner


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Wed Nov 17, 2004 6:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tomehta
Beginner


Joined: 19 Dec 2003
Posts: 17
Topics: 5

PostPosted: Fri Nov 19, 2004 9:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Jeba
Beginner


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Fri Nov 19, 2004 10:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tomehta
Beginner


Joined: 19 Dec 2003
Posts: 17
Topics: 5

PostPosted: Sat Nov 20, 2004 4:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Jeba
Beginner


Joined: 02 Dec 2002
Posts: 48
Topics: 9
Location: Columbus, GA

PostPosted: Mon Nov 22, 2004 10:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group