ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQ z/OS - Keep triggering

Post new topic  Reply to topic
 MQ z/OS - Keep triggering « View previous topic :: View next topic » 
Author Message
CharlieChen
PostPosted: Sun Jun 24, 2012 11:39 pm    Post subject: MQ z/OS - Keep triggering Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

I'm testing the WebSphere MQ CICS Adapter (www . ibm . com/developerworks/websphere/library/techarticles/0511_suarez/0511_suarez.html).

I modified the controller MQCTLR which is triggered by CKTI. The change is to read a file and decide on which transaction to start instead of just starting the same transaction.

So when the MQCTLR is trigger by queue A, we will start PROGA. If triggered by queue B, we will start PROGB.

(I can have MQCTLRA, MQCTLRB, etc to achieve the same purpose but I didn't want to modify the MQCTLR program and also to keep the queue definitions consistent for all the queues)

I encounter some error in reading the file where CICS return 13, which is length error. I want to EXEC CICS RETURN when this happen. So the message in the application queue has not been read yet.

What happens is that MQ keep triggering this MQCTLR. I notice the use count keep going up. I don't understand why this is happening. The trigger message has been consumed since I trigger FIRST, I assume no more trigger message will be created. But seems not the case.

Anybody could help me out here ? Thanks very much in advance.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Sun Jun 24, 2012 11:49 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

if the queue has not been opened so far check the queuemanager trigint attribute ..... (Trigger Interval)

if the queue was already opened and then closed without comsuming the application message that caused the trigger to be created, then mq triggers again (more conditions to be fullfilled, thats just the easy version)
_________________
Regards, Butcher
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 25, 2012 5:43 am    Post subject: Re: MQ z/OS - Keep triggering Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

CharlieChen wrote:
I'm testing the WebSphere MQ CICS Adapter (www . ibm . com/developerworks/websphere/library/techarticles/0511_suarez/0511_suarez.html).

I modified the controller MQCTLR which is triggered by CKTI. The change is to read a file and decide on which transaction to start instead of just starting the same transaction.

So when the MQCTLR is trigger by queue A, we will start PROGA. If triggered by queue B, we will start PROGB.

(I can have MQCTLRA, MQCTLRB, etc to achieve the same purpose but I didn't want to modify the MQCTLR program and also to keep the queue definitions consistent for all the queues)

I encounter some error in reading the file where CICS return 13, which is length error. I want to EXEC CICS RETURN when this happen. So the message in the application queue has not been read yet.

What happens is that MQ keep triggering this MQCTLR. I notice the use count keep going up. I don't understand why this is happening. The trigger message has been consumed since I trigger FIRST, I assume no more trigger message will be created. But seems not the case.

Anybody could help me out here ? Thanks very much in advance.


Why reinvent the wheel? Which transaction gets triggered depends on the process information on the triggered queue...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
CharlieChen
PostPosted: Mon Jun 25, 2012 11:36 pm    Post subject: Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

Hi Mr Butcher

Thanks very much for your reply. Exactly what I needed.

I put the EXEC CICS RETURN before and after the MQ OPEN and tested it. Yes. If I put before, the transactions did not get triggered again. After, it gets triggered. The overall effect looks like the program goes into a loop and it was tricky to see the source of the problem.

Would like to know if this behaviour is documented anywhere ? Or maybe I misunderstood something in the manual.

We are making use of the CICS ADAPTER as in the URL I've written earlier. The logic is that I will open the queue once and then loop to EXEC CICS START my Message Handler as required. So if I need to log something, I would have to EXEC WRITE FILE after open queue (once) and before I EXEC CICS LINK to my Message Handler in the loop. Then this problem become inevitable. I wonder if my concern is valid ? I think the point is that the message is not backed as I have not yet GET the message and so our backout checking will not handle this either.

Mr Butcher wrote:
if the queue has not been opened so far check the queuemanager trigint attribute ..... (Trigger Interval)

if the queue was already opened and then closed without comsuming the application message that caused the trigger to be created, then mq triggers again (more conditions to be fullfilled, thats just the easy version)
Back to top
View user's profile Send private message
CharlieChen
PostPosted: Mon Jun 25, 2012 11:40 pm    Post subject: Re: MQ z/OS - Keep triggering Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

I can do that. But inside the Message Controller, it would need to EXEC CICS START the Message Handler, and the program name need to be modify with each queue. So I prefer to read the queue name off a file instead of modifing the Message Controller.

fjb_saper wrote:
CharlieChen wrote:
I'm testing the WebSphere MQ CICS Adapter (www . ibm . com/developerworks/websphere/library/techarticles/0511_suarez/0511_suarez.html).

I modified the controller MQCTLR which is triggered by CKTI. The change is to read a file and decide on which transaction to start instead of just starting the same transaction.

So when the MQCTLR is trigger by queue A, we will start PROGA. If triggered by queue B, we will start PROGB.

(I can have MQCTLRA, MQCTLRB, etc to achieve the same purpose but I didn't want to modify the MQCTLR program and also to keep the queue definitions consistent for all the queues)

I encounter some error in reading the file where CICS return 13, which is length error. I want to EXEC CICS RETURN when this happen. So the message in the application queue has not been read yet.

What happens is that MQ keep triggering this MQCTLR. I notice the use count keep going up. I don't understand why this is happening. The trigger message has been consumed since I trigger FIRST, I assume no more trigger message will be created. But seems not the case.

Anybody could help me out here ? Thanks very much in advance.


Why reinvent the wheel? Which transaction gets triggered depends on the process information on the triggered queue...
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Mon Jun 25, 2012 11:57 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

i agree with fjb_saber. you re-invent the wheel.

Instead of triggering MQCTRL, you could also trigger the queue-related transaction directly by having a proper process definition with the queue-related transaction name in it.

In case you have a special need for a MQCTRL transaction before you start the "real" application transaction you could still use the fields in the process definition to pass the tx name to MQCTRL. Check the MQTM structure which is passed from CKTI to the triggered transaction.

So there is no need to maintain an file to have a reference from queue name to transaction. you can do it all with the MQ objects.

And - yes, the trigger conditions are well documented, and high frequently discussed. check the documentation for the trigger conditions, search here, .....
_________________
Regards, Butcher
Back to top
View user's profile Send private message
CharlieChen
PostPosted: Tue Jun 26, 2012 5:52 pm    Post subject: Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

I'm changing to use trigger data and test out... Thanks very much for all the help and suggestion.
Back to top
View user's profile Send private message
CharlieChen
PostPosted: Sun Jul 01, 2012 6:15 pm    Post subject: Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

I'm now using Triggered Data to hold the transaction id that I will EXEC CICS START.

I've tested 2 negative cases:

1. Transaction ID = Blank. I catch this error and end the transaction. This is before the MQ OPEN QUEUE. No Problem here.

2. Transaction ID error - not found. Assume that the promotion was in error and the TXN id is promoted incorrectly. I get a AEI1 abend. The "looping problem" comes back again. This is the case even when I HANDLE ABEND and CLOSE the queue. MQ keeps starting the transaction because the EXEC CICS START is after the MQ OPEN QUEUE.

Any advice on how to handle item 2 ?
Thanks very much !
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jul 01, 2012 7:08 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You can't handle item 1 the way you do. You should trigger some kind of alert, because something is wrong in the setup.
Same thing for item 2. However if you keep opening and closing the queue, the queue will keep on triggering. This is why you need to alert somebody.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
CharlieChen
PostPosted: Sun Jul 01, 2012 7:46 pm    Post subject: Reply with quote

Novice

Joined: 24 Jun 2012
Posts: 15

Agree, I need to alert somebody. This is a test program not the final, so I just end the transaction.

The issue in item 2 is that it will go into a loop and I want to see if it's possible to programatically stop the triggering, cause the mainframe effectivly goes into a loop. The SA will take a while to come and rectify the problem.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sun Jul 01, 2012 8:06 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

You can mqset triggering off for the queue.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MQ z/OS - Keep triggering
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.