Author |
Message
|
brnase |
Posted: Thu Jan 31, 2008 11:00 am Post subject: Trigger Retrieve Fail |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
I'm desinging a new application to be triggered in CICS, and am having some difficulty deciding what I should do if the EXEC CICS RETRIEVE fails for the trigger message. The queue is defined as a trigger type of first. From my understanding, if the retrieve fails, the queue will just keep triggering the application, causing excessive executions if the retrieve keeps failing.
Is there some sort of switch to prevent the application from being triggered until the issue can be solved with the retrieve? Or is it best to perform a CICS delay in the application after the application's retrieve fails so the queue doesn't keep triggering it?
Any enlightenment on this situation would be appreciative.
Thanks,
Brandon |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 31, 2008 12:07 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why are you not using the supplied trigger monitor? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
brnase |
Posted: Thu Jan 31, 2008 12:30 pm Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
Let me respond by saying I'm only an application programmer. I do not deal with any of the technical settings of MQ, nor do I deal with the trigger monitoring application. To be honest, I don't quite understand all that goes on behind the scenes with triggering. All I know is that my application is triggered when the queue has a message. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 31, 2008 2:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
contact admin wrote: |
I work for a very large company, and I'm only an application programmer. I do not deal with any of the technical settings of MQ. For that matter, I have never heard of a trigger monitor and therefore don't quite understand all that goes on behind the scenes with triggering. |
So why are you worrying about an MQ problem and not about a CICS problem?
CICS should receive the message (MQGET). Now if CICS is not able to retrieve the message it will get an error code and reason code from MQ and exit yes? Write these 2 codes to the error log and let the MQAdmin alert you if the queue fills up and is not being drained. You will then both need to work hand in hand about fixing the condition.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
brnase |
Posted: Thu Jan 31, 2008 3:02 pm Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
fjb_saper wrote: |
Now if CICS is not able to retrieve the message it will get an error code and exit yes? |
I agree that this is exactly what I do. But when my application exits, won't the queue trigger my application again, the retrieve fails again, and so on, looping infinitely? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 31, 2008 3:03 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fjb_saper wrote: |
contact admin wrote: |
I work for a very large company, and I'm only an application programmer. I do not deal with any of the technical settings of MQ. For that matter, I have never heard of a trigger monitor and therefore don't quite understand all that goes on behind the scenes with triggering. |
So why are you worrying about an MQ problem and not about a CICS problem?
CICS should receive the message (MQGET). Now if CICS is not able to retrieve the message it will get an error code and reason code from MQ and exit yes? Write these 2 codes to the error log and let the MQAdmin alert you if the queue fills up and is not being drained. You will then both need to work hand in hand about fixing the condition. |
Just remember to do a GET with wait waittime.. to allow for UOW completion problems...
Enjoy  _________________ MQ & Broker admin
Last edited by fjb_saper on Thu Jan 31, 2008 3:35 pm; edited 1 time in total |
|
Back to top |
|
 |
brnase |
Posted: Thu Jan 31, 2008 3:15 pm Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
The MQGET is not my problem. It's the EXEC CICS RETRIEVE statement that I'm talking about when I retrieve the MQ trigger message, before opening and doing an sort of processing on the queue.
Maybe I can give you a more detailed possible situation:
When the queue triggers my application, I perform an EXEC CICS RETRIEVE for the MQ trigger message. If this retrieve fails for any reason, my program exits. How does MQ know not to trigger my application again, because the EXEC CICS RETRIEVE could just keep failing, and my application would exit, thus possibly causing an infinite loop (or loop until the EXEC CICS RETRIEVE returned with a normal response). Everytime that RETRIEVE fails I have code to send an audible alert to our command center, and I'm sure they don't want to hear this audible alert thousands of times because I can't get out of this loop. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 31, 2008 3:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If this happens you SHOULD bug the ops people until they fix it. Because at that time you will not be the only one...
Something will be wrong in the system (major event) and should get fixed right away.
My assumption here is of course that it is not your code that is preventing you from getting a correct return code on the EXEC CICS RETRIEVE.... and if it is you can always stop triggering for that queue...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jan 31, 2008 4:14 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
contact admin wrote: |
Maybe I can give you a more detailed possible situation:
When the queue triggers my application, I perform an EXEC CICS RETRIEVE for the MQ trigger message. |
You are failing on getting the trigger message from the init queue? Or failing on the get of the application message from the application queue? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 31, 2008 4:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
PeterPotkay wrote: |
contact admin wrote: |
Maybe I can give you a more detailed possible situation:
When the queue triggers my application, I perform an EXEC CICS RETRIEVE for the MQ trigger message. |
You are failing on getting the trigger message from the init queue? Or failing on the get of the application message from the application queue? |
I believe that means that he is not able to start the CICS transaction and retrieve the shared mem area (77) where the TMC2 info is being passed... _________________ MQ & Broker admin |
|
Back to top |
|
 |
brnase |
Posted: Fri Feb 01, 2008 6:27 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
fjb_saper wrote: |
and if it is you can always stop triggering for that queue... |
Can this be done in my application? Or would this be done by one of our MQ admins? Also, if I can stop the triggering for a certain queue in my application, how would I then go about getting it turned back on? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 6:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
contact admin wrote: |
fjb_saper wrote: |
and if it is you can always stop triggering for that queue... |
Can this be done in my application? Or would this be done by one of our MQ admins? Also, if I can stop the triggering for a certain queue in my application, how would I then go about getting it turned back on? |
It would typically be done by the admins, or some kind of monitoring software in response to the failure.
It can be done programatically, but if I was the admin on your site I wouldn't grant the permissions to your program to do it......
(No disrespect intended, just applications shouldn't run with administrative rights IMHO. And if I was your admin it would be MHO that carried the day!) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
brnase |
Posted: Fri Feb 01, 2008 7:22 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
So maybe I'm thinking that this is just a lost cause effort. If there is something wrong where I can't do a retrieve on the trigger message, obviously there is something much more major going wrong in the CICS region. Unless I can get any other good suggestions, I may just design in a CICS delay in the application for a certain period before returning control to CICS. This way, those audible alerts to our command center won't go off as often. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 01, 2008 7:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
contact admin wrote: |
So maybe I'm thinking that this is just a lost cause effort. If there is something wrong where I can't do a retrieve on the trigger message, obviously there is something much more major going wrong in the CICS region. Unless I can get any other good suggestions, I may just design in a CICS delay in the application for a certain period before returning control to CICS. This way, those audible alerts to our command center won't go off as often. |
I'm with fjb_saper on this one. If you can't do the retrieve then I think it's a really good idea for the alert to sound like a fire alarm because someone should be notified.
Also your MQ admin should have configured his system not to repeatedly trigger your application in the event of failure but to raise a single alert, though as this is mainframe it's possible the configuration will permit this.
And nothing gets you to fix your configuration faster than a group of outraged ops staff equipted with burning torches, a small portable gallows and a copy of "Lynching for Dummies".
(There's a thread in here somewhere which discusses trigger type every, why it's a bad thing and why you might use it under CICS anyway. Look it up if you're interested). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
brnase |
Posted: Fri Feb 01, 2008 8:00 am Post subject: |
|
|
Newbie
Joined: 31 Jan 2008 Posts: 7
|
Vitor wrote: |
(There's a thread in here somewhere which discusses trigger type every, why it's a bad thing and why you might use it under CICS anyway. Look it up if you're interested). |
I have spent many hours researching the trigger type every and after much debate, I realized that it was a bad idea to design it as every for this project. I am in fact using a trigger type first in this situation and am using a wait interval of unlimited when getting messages. This just allows my transaction to run continously until the CICS region/MQ shuts down or there is a bad comp code from the MQGET. |
|
Back to top |
|
 |
|