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 Discussion » Program looping when MQCMIT not issued

Post new topic  Reply to topic
 Program looping when MQCMIT not issued « View previous topic :: View next topic » 
Author Message
Amar Tayade
PostPosted: Sat Nov 01, 2003 5:39 pm    Post subject: Program looping when MQCMIT not issued Reply with quote

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
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Sat Nov 01, 2003 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Amar Tayade
PostPosted: Sat Nov 01, 2003 9:39 pm    Post subject: Program looping when MQCMIT not issued Reply with quote

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
View user's profile Send private message Yahoo Messenger
bob_buxton
PostPosted: Sun Nov 02, 2003 2:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Amar Tayade
PostPosted: Sun Nov 09, 2003 9:37 pm    Post subject: Program looping when MQCMIT not issued Reply with quote

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
View user's profile Send private message Yahoo Messenger
bob_buxton
PostPosted: Mon Nov 10, 2003 1:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Amar Tayade
PostPosted: Thu Jan 22, 2004 6:42 pm    Post subject: Program looping when MQCMIT not issued Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Program looping when MQCMIT not issued
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.