|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Display Reason Description in Code |
« View previous topic :: View next topic » |
Author |
Message
|
sumangeorge |
Posted: Thu Mar 23, 2017 12:56 pm Post subject: Display Reason Description in Code |
|
|
Newbie
Joined: 26 Feb 2017 Posts: 2
|
I am using IBM MQ Client to get and post messages.
In case of error i get reason code, but i need a reason description so that i can put it in a log file for others to understand.
Code:
Code: |
MQCONNXAny strQueueManagerName, CNOCD, gHconListen_Out, CompCode, Reason
I am writing this code in VB6.
Please let me know if there's any way by which i can get reason description instead of code. |
|
|
Back to top |
|
 |
hughson |
Posted: Thu Mar 23, 2017 1:08 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
There is a header file cmqstrc.h in the C include directory which facilitates this. You can see examples of it being used if you search the amqsevta.c sample for the function lookup.
I have no idea if you can use C header files from VB6. Is the VB interface even still in support?
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Mar 23, 2017 3:12 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
There is an old IBM SupportPac MA0K that had a VB module with a function to return the MQRC_ name for MQ ReasonCodes, but this was deprecated by newer MQ classes in .Net.
In VB6 and VB.Net, you can put a Try block around the MQ code, and do
Catch mqe As MQExeption.
mqe.ToString() returns something like "CompCode: 2, Reason: 2538"
mqe.Message returns "MQRC_HOST_NOT_AVAILABLE"
The individual codes are also accessible via mqe.CompletionCode & mqe.ReasonCode _________________ Glenn |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 24, 2017 4:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hughson wrote: |
Is the VB interface even still in support? |
No.
But then, VB6 isn't in support either. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Mar 27, 2017 4:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
|
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
|
|
|
|