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 » [Solved] What MQOpen options needed for MQSet?

Post new topic  Reply to topic
 [Solved] What MQOpen options needed for MQSet? « View previous topic :: View next topic » 
Author Message
RatherBeGolfing
PostPosted: Tue Mar 16, 2004 11:07 am    Post subject: [Solved] What MQOpen options needed for MQSet? Reply with quote

Centurion

Joined: 12 Nov 2002
Posts: 118
Location: Syracuse, NY, USA

I have a developer who is trying to alter the MQIA_INHIBIT_PUT attribute of a QAlias using MQSet through VBScript. We're running MQ5.3 with CSD04 in a Windows 2000 environment.

He's failing because he's not setting the proper Open options. I've looked in the manuals and can't find where we should be setting anything other than MQOO_Set.

Any advice?
_________________
Cheers,
Larry
MQ Certifiable
Back to top
View user's profile Send private message
clindsey
PostPosted: Tue Mar 16, 2004 11:25 am    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Larry,

I don't have any vb code but this works for me in C.
I verified it works on an alias as well.

Code:

oOptions = MQOO_SET |
              MQOO_FAIL_IF_QUIESCING;

   MQOPEN(hCon, &od, oOptions, &hObj, &compCode, &reason); 

   /* prepare to report error if it failed */
   if (compCode != MQCC_OK)
   {
      printf("MQOPEN ended with reason code %d\n", reason);
   }
   else
   {
 
      switch (option)
      {
         case 1: // GET enable
            Select[0] = MQIA_INHIBIT_GET;   /* attribute selector       */
            IAV[0]    = MQQA_GET_ALLOWED; /* attribute value          */
            break;

         case 2: // PUT enable
            Select[0] = MQIA_INHIBIT_PUT;   /* attribute selector       */
            IAV[0]    = MQQA_PUT_ALLOWED; /* attribute value          */
            break;
      }

      MQSET(hCon,            /* connection handle               */
            hObj,                  /* object handle                     */
            1,                       /* Selector count                    */
            Select,                /* Selector array                    */
            1,                       /* integer attribute count         */
            IAV,                   /* integer attribute array         */
            0,                      /* character attribute count      */
            NULL,                 /* character attribute array      */
            &compCode,       /* completion code                  */
            &reason);           /* reason code                        */


MQOO_FAIL_IF_QUIESCING is optional so just MQOO_SET should be ok.

What is the reason code you get and is it on the open or the set call.

Charlie
Back to top
View user's profile Send private message
RatherBeGolfing
PostPosted: Wed Mar 17, 2004 7:55 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2002
Posts: 118
Location: Syracuse, NY, USA

Thanks Charlie, once our developer took a look at your code snip, something clicked and he was able to correct the situation we were having.
Appreciate you taking the time to share with us!
_________________
Cheers,
Larry
MQ Certifiable
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 » IBM MQ API Support » [Solved] What MQOpen options needed for MQSet?
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.