Author |
Message
|
btdo |
Posted: Wed Jul 13, 2005 10:45 am Post subject: reason code to string |
|
|
Novice
Joined: 03 Jun 2005 Posts: 19
|
Hi
I'm writing a vb.net client application and I am just wondering if IBM have made available something that would translate reason code to a message string. For example reason code = 2217 would be translated as "Connection not Authorized" . This is because I would hate to enter all those reason code values into an array and search the array everytime I need to check a reason code. Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 13, 2005 10:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
MQRC_QMGR_NAME_ERROR isn't necessarily going to be any more understandable to your users than 2058.
In other words, this is more complicated than translating the RC to a string.
There is an mqrc program, you could invoke behind the scenes.
Code: |
MQRC Usage:
Interpret a retcode or a number of retcodes in a range
mqrc [-a] <retcode>
mqrc -r <retcode> [-a]
mqrc -R [-f <first> -l <last>] [-a]
Interpret a message or a number of messages in a range
mqrc [-a] AMQ<number>
mqrc -m [AMQ]<number> [-a]
mqrc -M -f <first> -l <last> [-a]
Interpret a retcode symbol
mqrc <symbol>
mqrc -s <symbol>
Display help
mqrc -h Display this help
mqrc -v Display the version number
Where the options are:
-a Try all severities to find message text
-f <number> First number in range
-l <number> Last in number range
1. Numeric arguments are interpreted as decimal if they start with a
digit 1 to 9, or hex if prefixed with "0x"
2. If no range is given when interpreting a range of retcodes, then all
the retcodes are listed.
3. When printing retcodes or messages in a range, if there is a problem
with message, an indication is printed just before the message text,
as follows:
'?' There are no matching retcodes for this message
'!' The message severity is different to the retcode severity
|
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
zpat |
Posted: Wed Jul 13, 2005 11:28 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
There is an IBM MQ support pac that provides sample source for converting reason codes to error message text. |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Jul 13, 2005 11:34 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
JohnGee |
Posted: Wed Jul 13, 2005 12:52 pm Post subject: |
|
|
Newbie
Joined: 07 Apr 2005 Posts: 8
|
There is a property in the MQException class called Message. For example a reason code of 2085, the Message property will contain: "MQRC_UNKNOWN_OBJECT_NAME" |
|
Back to top |
|
 |
btdo |
Posted: Thu Jul 14, 2005 5:28 am Post subject: reason code to string |
|
|
Novice
Joined: 03 Jun 2005 Posts: 19
|
Hi
I've gone to the website "http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24000652&loc=en_US&cs=utf-8&lang=en" to download "mk0k", but this version only support vb 4.0 and above, it does not support VB.net. Would you know if IBM have released a version that support vb.net ? |
|
Back to top |
|
 |
oz1ccg |
Posted: Fri Jul 15, 2005 11:01 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
If you can't download it, take the copy book and write your own function. I shouldn't take more than 5 minutes..... Just a small table. And when finished it, you could get it uploaded here ...
Sometimes it's legal to invent the wheel again. Just a thought.
Just my $0.02  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 15, 2005 2:02 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
JohnGee wrote: |
There is a property in the MQException class called Message. For example a reason code of 2085, the Message property will contain: "MQRC_UNKNOWN_OBJECT_NAME" |
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|