|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQCMD_START_CHANNEL PCF in Visual Basic |
« View previous topic :: View next topic » |
Author |
Message
|
jimjoepaw |
Posted: Wed Mar 08, 2006 12:08 pm Post subject: MQCMD_START_CHANNEL PCF in Visual Basic |
|
|
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 |
|
 |
wschutz |
Posted: Wed Mar 08, 2006 12:54 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
jimjoepaw |
Posted: Wed Mar 08, 2006 2:15 pm Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Wed Mar 08, 2006 6:30 pm Post subject: |
|
|
 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 |
|
 |
jimjoepaw |
Posted: Thu Mar 09, 2006 8:04 am Post subject: |
|
|
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 |
|
 |
jimjoepaw |
Posted: Thu Mar 09, 2006 8:19 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|