Author |
Message
|
Amar Tayade |
Posted: Sat Nov 01, 2003 5:39 pm Post subject: Program looping when MQCMIT not issued |
|
|
 Newbie
Joined: 22 Nov 2002 Posts: 9
|
Hi,
I am working on mainframe/IMS platform. My application program went into loop causing bringing down one of the IMS region.
The program works as follows..
1) IMS GU call after trigger
2) MQGEt within synchpoint and fail-if-quiescing
3) IF error in MQGET
3a) Bypass MQCMIT ;set error flags; write a errordump
disconnect Qmgr; goto 4
ELSE 3b) MQCMIT ; disconnect Qmgr ; goto 4
4) wait till all message are drained from the queue
wait for next trigger
Now why my program should go in loop when MQGET is failing with 2005? It appears that when MQCMIT is not happening the current message is not being deleted from the queue and triggering the program again & again.
How can I handel the situation here.?
I believe that reading queue with no-synchpoit option will delete the message in case of program abend (?).
Also reading within no-synchpoint would not help as I want to preserve the message in case of abends caused due to other system-errors.
Thanx,
Amar |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Nov 01, 2003 6:09 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Your program should check the backout count of each message. If it is greater than the backout retry count, then it should instead of rolling the message back, put it on the backout queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amar Tayade |
Posted: Sat Nov 01, 2003 9:39 pm Post subject: Program looping when MQCMIT not issued |
|
|
 Newbie
Joined: 22 Nov 2002 Posts: 9
|
But how can I backout the message when MQGET itself failed ?
Meaning to say for backout I will have to issue MQPUT call with the message which I am not having ?
Thanx
Amar |
|
Back to top |
|
 |
bob_buxton |
Posted: Sun Nov 02, 2003 2:55 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
Whether you issued commit or not is irelevant since you had never gotten a message. Because you closed the queue while there was still a message on the queue MQ generated another trigger message resulting in a loop of your program being continually restarted and failing again.
So what you need to do is solve the cause of your get error.
Quote: |
MQRC_BUFFER_LENGTH_ERROR (2005)
Explanation: The BufferLength parameter is not valid, or the parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
|
BTW to get out of this type of loop without recycling IMS (or CICS) you can set the Get disabled queue attribute. _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
Amar Tayade |
Posted: Sun Nov 09, 2003 9:37 pm Post subject: Program looping when MQCMIT not issued |
|
|
 Newbie
Joined: 22 Nov 2002 Posts: 9
|
I am checking with BufferLength parameters but not seeing any problem.
Can this situation be possible when buffer is not sufficient ?
How can we set this disable attribute ? ( By administrator or by program itself ?)
Thanx
Amar |
|
Back to top |
|
 |
bob_buxton |
Posted: Mon Nov 10, 2003 1:56 am Post subject: |
|
|
 Master
Joined: 23 Aug 2001 Posts: 266 Location: England
|
A buffer length error will be raised if the length is negative, perhaps you have an extra level of indirection passing an address instead of a value.
You can set a queue get inhibited by operator command
Code: |
ALTER QL(name) GET(DISABLED) |
or by a progam using MQSET with attribute MQIA_INHIBIT_GET and value MQQA_GET_INHIBITED _________________ Bob Buxton
Ex-Websphere MQ Development |
|
Back to top |
|
 |
Amar Tayade |
Posted: Thu Jan 22, 2004 6:42 pm Post subject: Program looping when MQCMIT not issued |
|
|
 Newbie
Joined: 22 Nov 2002 Posts: 9
|
Thank you very much for all your help.
MQGET was successful for first message but during MQGET bufferlength
value was changed to -ve value (dont know why still) . Hence second and subsequent calls were failing .
So made a change in Application program such that if program fails with MQRC ; quit out of the transaction without reading all messages in the queue.
Thanx
Amar |
|
Back to top |
|
 |
|