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 » Inquiring properties of an open queue with VB

Post new topic  Reply to topic
 Inquiring properties of an open queue with VB « View previous topic :: View next topic » 
Author Message
millerchris
PostPosted: Thu Oct 10, 2002 11:55 am    Post subject: Inquiring properties of an open queue with VB Reply with quote

Newbie

Joined: 10 Oct 2002
Posts: 1

I am attempting to Inquire the properties from an open Queue with MQ Series 5.2 on Windows NT. I am receiving the following error:

MQAX200.MQQueue::GetBackoutRequeueName CompletionCode = 2, ReasonCode = 2067, ReasonName = MQRC_SELECTOR_ERROR

My goal is to be able to inquire the Queue properties so I can send a message to the Backout Queue when the Backout Count exceeds the Backout Threshold. I could hardcode the Backout Queue information but would rather pull it from the Queue properties. Here is the code I am using to open the Queue from inside a Trigger program:

Code:

    lngGetOptions = _
          MQGMO_WAIT _
       Or MQGMO_ACCEPT_TRUNCATED_MSG _
       Or MQGMO_CONVERT _
       Or MQOO_INQUIRE _
       Or MQOO_INPUT_AS_Q_DEF
   
    If mobjMQSession Is Nothing Then
        Set mobjMQSession = New MQAX200.MQSession
    End If

    Set mobjMQQueueManager = mobjMQSession.AccessQueueManager("DEV01")
    Set mobjMQQueue = mobjMQQueueManager.AccessQueue("SSE.REPLY", lngGetOptions, "DEV01")

    'mobjMQQueueManager.IsConnected returns True
    'mobjMQQueueManager.IsOpen returns True
    'mobjMQQueue.IsOpen returns True

    ' Error 2067 occurs on each of these lines
    strBackoutQueueName = mobjMQQueue.BackoutQueueName
    lngBackoutThreshold = mobjMQQueue.BackoutThreshold



The documentation states that all properties can be accessed only if the object is connected to a queue manager, and the user's user ID is authorized for Inquire or Set against that queue. If an alternate user ID is set and the current user ID is authorized to use it, the alternate user ID is checked for authorisation instead.

Both my NT Domain user ID and MUSR_MQADMIN local user ID are in the local MQM NT Group. I am not using alternate IDs.

I am using the MQAX200.dll for Windows NT that wraps the MQINQ function by setting the neccessary selector values. When I try calling MQINQ directly with the MQIA_BACKOUT_THRESHOLD and MQCA_BACKOUT_REQ_Q_NAME selectors (using the code in the cmqb.bas sample VB file) I received the same error and reason codes.

Where do I set the authorizations for user IDs? The Trigger program is starting as MUSR_MQADMIN (correct?) Isn't this user id authorized for any process? How would I specify another user (or do I need to)?

Thank you for any helpful information provided!
Back to top
View user's profile Send private message
nimconsult
PostPosted: Thu Oct 10, 2002 9:47 pm    Post subject: Reply with quote

Master

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

I have never used the VB COM interface to MQ, but your code shows that you mix MQGMO_ options (get message options) with MQOO_ options (open options) in your open options.

Try to remove the MQGMO_ options (and read the doc for appropriate open options if this still does not work)
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Inquiring properties of an open queue with VB
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.