|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Handling Invalid Message character set (Not Ascii) |
« View previous topic :: View next topic » |
Author |
Message
|
mgorauser |
Posted: Fri Jan 19, 2007 3:54 am Post subject: Handling Invalid Message character set (Not Ascii) |
|
|
Newbie
Joined: 19 Jan 2007 Posts: 3 Location: India
|
I want to handle Error when character set of Message is not Ascii
what should I add in the code below.
MQGET( Hcon,
Hobj,
&md, &gmo, buflen, buffer, &messlen, &CompCode,
&Reason);
/* report reason, if any */
if (Reason != MQRC_NONE)
{
if (Reason == MQRC_NO_MSG_AVAILABLE)
{
break;
}
else
{
if (Reason == MQRC_TRUNCATED_MSG_FAILED)
{
CompCode = MQCC_FAILED;
}
goto sqlerror;
}
} |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 19, 2007 4:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Something like
if MQMD.CCSID != 437
{
break;
}
You'll find field details in the Application Programming Guide & Reference.
(Code is supplied as an example, no warrenty express or implied is given and the author is not liable to any loss or damage directly or indirectly caused by it's use or omission) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 19, 2007 4:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Or you could specify MQGMO_CONVERT, then it will always be ASCII (assuming you're running on an ASCII machine!)
(Details in the same manuals as before)
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Fri Jan 19, 2007 6:49 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
And assuming the MQMD.Format is MQSTR otherwise MQRC 2110 is returned.
Also you should use MQGMO_WAIT in any real-time apps. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Jan 21, 2007 11:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
And assuming the MQMD.Format is MQSTR otherwise MQRC 2110 is returned.
|
Well quite, but I thought I'd deal with that in the next post....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|