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 » reason code to string

Post new topic  Reply to topic
 reason code to string « View previous topic :: View next topic » 
Author Message
btdo
PostPosted: Wed Jul 13, 2005 10:45 am    Post subject: reason code to string Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed Jul 13, 2005 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Wed Jul 13, 2005 11:28 am    Post subject: Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Wed Jul 13, 2005 11:34 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You're looking for MA0K:

http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24000652&loc=en_US&cs=utf-8&lang=en
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
JohnGee
PostPosted: Wed Jul 13, 2005 12:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
btdo
PostPosted: Thu Jul 14, 2005 5:28 am    Post subject: reason code to string Reply with quote

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
View user's profile Send private message
oz1ccg
PostPosted: Fri Jul 15, 2005 11:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PeterPotkay
PostPosted: Fri Jul 15, 2005 2:02 pm    Post subject: Reply with quote

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
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 » reason code to string
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.