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 » WebSphere Message Broker (ACE) Support » Comparing chacrter as byte in esql

Post new topic  Reply to topic
 Comparing chacrter as byte in esql « View previous topic :: View next topic » 
Author Message
rajindrap
PostPosted: Fri Nov 06, 2015 2:39 am    Post subject: Comparing chacrter as byte in esql Reply with quote

Newbie

Joined: 25 Oct 2015
Posts: 3

Hi,

I am trying to replace the characters which are represented as more than one byte.
can we comapre BLOB values in esql?

I tried as below:
DECLARE chacr_hex BLOB;
SET chacr_hex = CAST( c AS BLOB CCSID 1208);
IF chacr_hex > X'FF' THEN
SET c = REPLACE_CHAR;
END IF;
Back to top
View user's profile Send private message
timber
PostPosted: Fri Nov 06, 2015 2:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
I am trying to replace the characters which are represented as more than one byte
In which encoding? Your code assumes UTF-8, but is that just an example?

Why do you want to do this? Are you receiving non-ASCII text and writing ASCII?

btw, X'FF' is not the correct boundary. Multibyte UTF-8 characters start at 0x80.
Back to top
View user's profile Send private message
rajindrap
PostPosted: Fri Nov 06, 2015 3:07 am    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2015
Posts: 3

Thanks for the reply.

The incoming data is UTF-8 and the destination is a MainFrame and require data EBCDIC 278.
So need to replacee the characters like euro sign etc.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Nov 06, 2015 3:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
The incoming data is UTF-8 and the destination is a MainFrame and require data EBCDIC 278.
So need to replace the characters like euro sign etc
You have a bigger problem than that. A simple range test on the Unicode representation of the character will not be sufficient.
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 » WebSphere Message Broker (ACE) Support » Comparing chacrter as byte in esql
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.