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 » Mainframe, CICS, TXSeries » Getting all the messages in queue

Post new topic  Reply to topic Goto page 1, 2  Next
 Getting all the messages in queue « View previous topic :: View next topic » 
Author Message
timmq
PostPosted: Fri Nov 30, 2007 7:33 am    Post subject: Getting all the messages in queue Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

Hi,

We are facing an issue while reading messages in queue. The scenario is like this..There is a Mainframe job that runs in every 2 minute. But when it runs it is not reading all the messages in the queue at that point of time. The number of message read are inconsistent. Suppose if there are 30 msgs, during the first run, the job will read 10 msgs, then 15, then 5. In the program we are using MQRC_NO_MSG_AVAILABLE reason code to terminate the execution. But it returns true even if there are messages availabe in queue.

Are we missing any parameters?

Thanks in advance.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 30, 2007 7:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you determined that the messages are *available*?

How are you deciding that there are messages there, when the program has ended?

How are you deciding that the messages came in BEFORE the program ended?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Nov 30, 2007 7:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Are you doing any of your gets by message id or correlation id?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
timmq
PostPosted: Fri Nov 30, 2007 7:51 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

during testing we were submitting this job manually. During submitting we will get the queue depth using RFHUtil. After each run, we will verify the queuedepth. But queue depth will be zero after 2-3 runs. We were under the assumption that the program will be empty the queue after first run. Also, we stopped the Java program that is writing the messages before submtting the mainframe job.
Back to top
View user's profile Send private message
timmq
PostPosted: Fri Nov 30, 2007 7:53 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

No..we are not using any msgid or correlation id to get messages..we are clearing after msg id and correlation id each get
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 30, 2007 7:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So you're looking a queue depth. This could indicate more messages than are "available", because some messages have not been committed yet.

So you ran the java program to send the messages, and stopped it. Then you looked at the queue depth. Then you ran the mainframe job to read the queue... and it failed to read all the messages on the queue the first time.

You should browse the messages on the queue after the java program ends, just to make sure that you see the same number as the qdepth reports.

Then you should review the mainframe program to make sure that it doesn't try to match based on message id or etc, and that it properly clears the mqmd structure between GETS, so that it doesn't try to match based on message id or etc! (that second is a common problem).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
timmq
PostPosted: Fri Nov 30, 2007 10:28 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

apart from clearing the msgid and correlation id, is there any other paramaters needs to set or cleared?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 30, 2007 11:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It depends on what the application thinks it's trying to do.

Which may be very different from what you think the application is trying to do...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
timmq
PostPosted: Fri Nov 30, 2007 11:52 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

my understanding is that application never try to do anything by itself..I needed some help in preventing the application from doing something different..

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 30, 2007 12:11 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What I mean is that the application's code may not be doing what you think it is.

If you wanted to post the relevant pieces around the MQGET, I could offer something more meaningful (maybe. I'm not a zOS programmer). But absent that, I can only say - look at the code and see if you can see what it's doing wrong.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tleichen
PostPosted: Fri Nov 30, 2007 12:43 pm    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

timmq wrote:
my understanding is that application never try to do anything by itself..I needed some help in preventing the application from doing something different..

Thanks
Huh?!?
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 30, 2007 2:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

timmq wrote:
my understanding is that application never try to do anything by itself..


No, but it does exactly what it's been coded to do rather than what you think it's been coded to do.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timmq
PostPosted: Fri Dec 07, 2007 8:32 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

Am not a Cobol programmer too..

I worked with the Mainframe team to find out a reason/solution.
For testing, we used RFHUtil to put some 200 messages. The Cobol program in able to read all the 200 messages..Then we tried putting the same number of messages using the tool which we use(Java based). But in that case, the Mainframe is reading only fewer number messages. Since we are using tool's APIs I can't dig much...
Can you please help in figuring out the reason for this?.
Then I can raise this as a bug/issue with the tool.

Thanks in advance
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 07, 2007 8:39 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Do you see all 200 messages on the queue, after putting them with the tool and before starting the COBOL program?

And again, check both the queue depth *and* browse the queue.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
timmq
PostPosted: Fri Dec 07, 2007 8:49 am    Post subject: Reply with quote

Novice

Joined: 12 Sep 2007
Posts: 12

there are 80 messages in queue. queue depth is showing as 80 and also able to browse all the 80 messages. But when I ran the Cobol now, it processed only 13 records
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Getting all the messages in queue
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.