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 » IBM MQ API Support » PCF - MQCMD_INQUIRE_Q_STATUS issue

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next
 PCF - MQCMD_INQUIRE_Q_STATUS issue « View previous topic :: View next topic » 
Author Message
jefflowrey
PostPosted: Mon Oct 16, 2006 6:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

1) http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaq.doc/csqzaq0008.htm

2) If a single command specifies a generic object name, a separate response is returned in its own message for each matching object.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
IanB
PostPosted: Mon Oct 16, 2006 6:47 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

1) Cool, I've got the lengths for everything except MQ_LOG_EXTENT_NAME_LENGTH which isn't listed anywhere. All the others are predefined in some bas files fortunately. I'll try memcopying it to an array of chars and see if there's a nice string shaped hole I can measure.

2) That makes sense. It just so happens the example I was looking at returns lots of channels in one shot.
ie
buflen = MQCFH_STRUC_LENGTH + _
MQCFSL_STRUC_LENGTH_FIXED + MQ_CHANNEL_NAME_LENGTH * MAX_NUM_CHANNELS

jefflowrey wrote:
1) http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaq.doc/csqzaq0008.htm

2) If a single command specifies a generic object name, a separate response is returned in its own message for each matching object.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 16, 2006 6:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MQ_LOG_EXTENT_NAME_LENGTH 24 X'00000018'
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
IanB
PostPosted: Mon Oct 16, 2006 6:58 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

jefflowrey wrote:
MQ_LOG_EXTENT_NAME_LENGTH 24 X'00000018'


Oo where did you find that? Brilliant thanks!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 16, 2006 7:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Um.

That's the link I posted as 1) above.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 16, 2006 7:02 am    Post subject: Reply with quote

Grand High Poobah

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

IanB wrote:


Oo where did you find that? Brilliant thanks!



Click it and you'll see......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Mon Oct 16, 2006 7:12 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Vitor wrote:
IanB wrote:


Oo where did you find that? Brilliant thanks!



Click it and you'll see......


I think MQ has hurt my brain, I'm clearly unable to operate anymore
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 16, 2006 7:28 am    Post subject: Reply with quote

Grand High Poobah

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

Soggy Brain Syndrome - there's a lot of it about at the moment. I've had a couple of recent attacks

MQ Is Good For You
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Mon Oct 16, 2006 7:53 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Vitor wrote:
Soggy Brain Syndrome - there's a lot of it about at the moment. I've had a couple of recent attacks

MQ Is Good For You


Yep, SBS in combination with a Monday and a weekend at work. I see beer in my immediate future I think

I've made a bit of progress. I'll post the complete source if I get it working. I noticed the version I posted doesn't have the lines of code which actually open the queues :/
Back to top
View user's profile Send private message
IanB
PostPosted: Tue Oct 17, 2006 1:41 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Good morning.
Things are looking better. The request is going out, and I'm getting results, but:
When I filter to * it seems I have to :
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?

Second I'm requesting all attributes which by my reckoning should be >400 bytes of return data, but I'm getting 168 bytes :/ I'm using mqget for the moment so I get a handy string representation, but I'm not sure how I'm going to may it into a struct as the process doesn't seem so clear cut.

Here's my response type

Private Type PCFInquireQueueStatusResp
Header As MQCFH
CurrentDepth As MQCFIN
LastGetDate As MQCFST
LastGetDate_string As String * MQ_DATE_LENGTH
LastGetTime As MQCFST
LastGetTime_String As String * MQ_TIME_LENGTH
LastPutDate As MQCFST
LastPutDate_string As String * MQ_DATE_LENGTH
LastPutTime As MQCFST
LastPutTime_String As String * MQ_TIME_LENGTH
MediaRecoveryLogExtent As MQCFST
MediaRecoveryLogExtent_string As String * MQ_LOG_EXTENT_NAME_LENGTH
OldestMsgAge As MQCFIN
OnQTime As MQCFIL
OpenInputCount As MQCFIN
OpenOutputCount As MQCFIN
QName As MQCFST
QName_string As String * MQ_Q_NAME_LENGTH
QSGDisposition As MQCFIN
QueueMonitoring As MQCFIN
StatusType As MQCFST
UncommittedMsgs As MQCFIN
End Type

Cheers
Ian
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 17, 2006 1:46 am    Post subject: Reply with quote

Grand High Poobah

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

IanB wrote:
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?



I don't know - why do you need to go through the disconnect? What goes wrong when you don't (I'm assuming you've tried it & it's failed or you wouldn't have bothered asking the question ). Do you get an error, does the 2nd get come up empty, what?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Tue Oct 17, 2006 2:32 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Vitor wrote:
IanB wrote:
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?



I don't know - why do you need to go through the disconnect? What goes wrong when you don't (I'm assuming you've tried it & it's failed or you wouldn't have bothered asking the question ). Do you get an error, does the 2nd get come up empty, what?


Indeed,
MQGET gHcon, gReplyHobj, md, gmo, buflen, astring, datalen, CompCode, Reason

returns compcode 2 Reason 2033 which is MQRC_NO_MSG_AVAILABLE

However if I let it disconnect, reconnect (but don't send another request) it then pulls the next one off the queue. I was a bit suprised at first as I'd put about 4 quadrillion messages on there during the course of my testing
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 17, 2006 2:40 am    Post subject: Reply with quote

Grand High Poobah

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

Odd - I'd be inclined to extend the wait interval on the get. Sounds like something in the darkness is taking a while to commit the messages!

You certainly shouldn't need to disconnect.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
IanB
PostPosted: Tue Oct 17, 2006 2:53 am    Post subject: Reply with quote

Apprentice

Joined: 13 Oct 2006
Posts: 43

Vitor wrote:
Odd - I'd be inclined to extend the wait interval on the get. Sounds like something in the darkness is taking a while to commit the messages!

You certainly shouldn't need to disconnect.


Fixed it, it turns out I need to clear down the message options structure.

If I can just figure out how to parse the results I'll be sitting pretty
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 17, 2006 3:02 am    Post subject: Reply with quote

Grand High Poobah

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

Well yes, if you tell it to go and get the same message it's just read off the queue this will cause a 2033.

Bit of a schoolboy error there if you'll forgive the observation....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next Page 3 of 4

MQSeries.net Forum Index » IBM MQ API Support » PCF - MQCMD_INQUIRE_Q_STATUS issue
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.