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 » Handling Invalid Message character set (Not Ascii)

Post new topic  Reply to topic
 Handling Invalid Message character set (Not Ascii) « View previous topic :: View next topic » 
Author Message
mgorauser
PostPosted: Fri Jan 19, 2007 3:54 am    Post subject: Handling Invalid Message character set (Not Ascii) Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Jan 19, 2007 4:04 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Jan 19, 2007 4:05 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Fri Jan 19, 2007 6:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Sun Jan 21, 2007 11:50 pm    Post subject: Reply with quote

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
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 » Handling Invalid Message character set (Not Ascii)
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.