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 Installation/Configuration Support » MQCMD_START_CHANNEL PCF in Visual Basic

Post new topic  Reply to topic
 MQCMD_START_CHANNEL PCF in Visual Basic « View previous topic :: View next topic » 
Author Message
jimjoepaw
PostPosted: Wed Mar 08, 2006 12:08 pm    Post subject: MQCMD_START_CHANNEL PCF in Visual Basic Reply with quote

Newbie

Joined: 08 Mar 2006
Posts: 4

I'm receiving error 3008 when attempting to use the MQCMD_START_CHANNEL command from the mqexecute function.
I'm using MQ 5.3 on Windows 2000
I have defined the the necessary MQIC32.DLL(MQClient) functions.
I have valid connection and qmgr handles.
Here's my code.

Dim Bag As Long 'Bag handle'\
Dim ResponseBag As Long 'Bag handle'
Dim Selector As Long 'Selector'
Dim AttrsBag As Long

mqCreateBag MQCBO_ADMIN_BAG, Bag, mvarLastCompletionCode, mvarLastReasonCode

mqCreateBag MQCBO_ADMIN_BAG, ResponseBag, mvarLastCompletionCode, mvarLastReasonCode

mqAddString Bag, MQCACH_CHANNEL_NAME, MQBL_NULL_TERMINATED, "Chanel_svr1Tosrv2"", mvarLastCompletionCode, mvarLastReasonCode

mqExecute mvarConnectionHandle, MQCMD_START_CHANNEL, MQHB_NONE, Bag, ResponseBag, MQHO_NONE, MQHO_NONE, mvarLastCompletionCode, mvarLastReasonCode

Any help or guidance would be greatly appreciated.

Thanks,

Jim Pawlosky
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Mar 08, 2006 12:54 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

do you wind up running this as a user in the MQM group, we've seen 3008 mean... "not authorized" ...
http://www.mqseries.net/phpBB2/viewtopic.php?t=26638&highlight=3008
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jimjoepaw
PostPosted: Wed Mar 08, 2006 2:15 pm    Post subject: Reply with quote

Newbie

Joined: 08 Mar 2006
Posts: 4

Yes, my user is a member of the MQM group. I'm able to successfully use the MQIA_CURRENT_Q_DEPTH of the mqInquireInteger function using similar code. I'm also able to send and receive messages using MQGETX and MQPUTX. but I'm not having any success with the MQCMD_START_CHANNEL command. I believe my code is incomplete or that I'm not setting the parameters properly. Does anyone have example code starting Channels using MQCMD_START_CHANNEL?
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Mar 08, 2006 6:30 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Your code looks "okay" to me ...
You should add code to your program to print out the error code from the embedded
bag..I dont have anything for that in VB, but here's the code from the sample program amqsail.c:
Code:
     /*************************************************************************/
     /* If the command fails get the system bag handle out of the mqExecute   */
     /* response bag. This bag contains the reason from the command server    */
     /* why the command failed.                                               */
     /*************************************************************************/
     if (reason == MQRCCF_COMMAND_FAILED)
     {
       mqInquireBag(responseBag, MQHA_BAG_HANDLE, 0, &errorBag, &compCode,
                    &reason);
       CheckCallResult("Get the result bag handle", compCode, reason);

      /************************************************************************/
      /* Get the completion code and reason code, returned by the command     */
      /* server, from the embedded error bag.                                 */
      /************************************************************************/
      mqInquireInteger(errorBag, MQIASY_COMP_CODE, MQIND_NONE, &mqExecuteCC,
                       &compCode, &reason );
      CheckCallResult("Get the completion code from the result bag",
                       compCode, reason);
      mqInquireInteger(errorBag, MQIASY_REASON, MQIND_NONE, &mqExecuteRC,
                        &compCode, &reason);
      CheckCallResult("Get the reason code from the result bag",
                       compCode, reason);
      printf("Error returned by the command server: Cc = %d : Rc = %d\n",
              mqExecuteCC, mqExecuteRC);
    }

_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
jimjoepaw
PostPosted: Thu Mar 09, 2006 8:04 am    Post subject: Reply with quote

Newbie

Joined: 08 Mar 2006
Posts: 4

Thanks for the sample code. I used it and the reason code it returns is 4032. This appears to be an undocumented error number. Does anyone know of this reason code or have anything else to try.

Thanks,

Jim
Back to top
View user's profile Send private message
jimjoepaw
PostPosted: Thu Mar 09, 2006 8:19 am    Post subject: Reply with quote

Newbie

Joined: 08 Mar 2006
Posts: 4

Acutally, Reason code 4032 is documented and it is Channel not found.
I'm looking into the posibility of programmer typo error. Thanks again.
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 Installation/Configuration Support » MQCMD_START_CHANNEL PCF in Visual Basic
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.