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 IBM MQ Support » [Solved] Getting a Message with WAIT

Post new topic  Reply to topic
 [Solved] Getting a Message with WAIT « View previous topic :: View next topic » 
Author Message
jmeier
PostPosted: Thu Dec 19, 2002 8:30 am    Post subject: [Solved] Getting a Message with WAIT Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

I am trying to implement a wait into my get from a queue.

I implemented the following code and received a MQRC_OPTIONS_ERROR. My question is what is the difference between WaitInterval and MQGMO_WAIT; if they need to be used together; or if they work independently. I am currently just setting the WaitInterval, and I don't seem to be getting any errors, however, I also don't know if it is doing anything!! This is written in VB running on Win 2000.

oMsgOptions.WaitInterval = 100
oMsgOptions.Options = oMsgOptions.Options & MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING & MQAX200.MQ.MQGMO_SYNCPOINT & MQAX200.MQ.MQGMO_WAIT
GetMQQueue.Get oMsg, oMsgOptions
_________________
Joe Meier
Back to top
View user's profile Send private message
mqonnet
PostPosted: Thu Dec 19, 2002 9:02 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

MQGMO_WAIT and wait_interval work in conjunction. On a get you need to first say that i want to wait for a message, which is what MQGMO_WAIT is. And then you need to specify how long you want to wait, which is wait_interval.

As for why you are getting 2046.
Are you getting this on a Get, open or from which api call???
If on the get, what is the value of oMsgOptions.Options before you add MQGMO_WAIT and other stuff on it.

Cheers.
Kumar
_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmeier
PostPosted: Thu Dec 19, 2002 9:41 am    Post subject: Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

The only options are what I set and posted which is:MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING & MQAX200.MQ.MQGMO_SYNCPOINT

Would any of these cause an issue with WAIT?
_________________
Joe Meier
Back to top
View user's profile Send private message
nimconsult
PostPosted: Thu Dec 19, 2002 11:13 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

Code:
oMsgOptions.Options = oMsgOptions.Options & MQAX200.MQ.MQGMO_FAIL_IF_QUIESCING & MQAX200.MQ.MQGMO_SYNCPOINT & MQAX200.MQ.MQGMO_WAIT


If I remember well VB, the operator "&" is used for concatenation, not for logical expressions. You should use "or" or "+" to get a correct result.

Also, you are combining the options with a previous value of the variable, are you sure of the previous value of the variable?

Nicolas
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmeier
PostPosted: Fri Dec 20, 2002 6:59 am    Post subject: Reply with quote

Apprentice

Joined: 30 Aug 2002
Posts: 46
Location: Minneapolis

Thanks Nicolas...
I implemented your suggestions and so far in testing the error hasn't occured.
_________________
Joe Meier
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » [Solved] Getting a Message with WAIT
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.