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 » Convert ASCII Characters

Post new topic  Reply to topic
 Convert ASCII Characters « View previous topic :: View next topic » 
Author Message
Chuck831
PostPosted: Mon Nov 22, 2004 2:01 pm    Post subject: Convert ASCII Characters Reply with quote

Apprentice

Joined: 23 Dec 2002
Posts: 28

hope someone can point me in the right direction. Is it possible to convert a value to an extended ASCII character.

Example: (XML Input Message - XML Domain)

<DataArea>
<Customer>John Doe</Customer>
<Address> 602 1/2 Main Street</Address>
</DataArea>

The customer would like to convert the 1/2 to ASCII code 189 (½) in the output message for display purposes. I've looked at the CAST function and the BITSTREAM function but I'm still having trouble.

Environment:

Control Center 2.1
MQ Series: 5.2.1
CSD03
Windows 2000 Server

Thanks for any assistance you can provide.
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Nov 23, 2004 12:14 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Have you tried casting X'0189' to CHAR using CCSID option. It might give you ½ char.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
mqbee
PostPosted: Tue Nov 23, 2004 1:41 am    Post subject: Reply with quote

Novice

Joined: 31 Jul 2003
Posts: 15

Hi,
If am not wrong it should be X'BD' instead of X'0189'.
Back to top
View user's profile Send private message
Chuck831
PostPosted: Tue Nov 23, 2004 9:38 am    Post subject: Convert ASCII Characters Reply with quote

Apprentice

Joined: 23 Dec 2002
Posts: 28

Guys, I tried using the following, but I'm still not having much luck. If you could point out any errors I'm making that would be great.

I'm using the following code:


Code:

Set OutputRoot.XML.TestData.Value2 = CAST(X'BD' as CHAR ccsid 1208);

Set OutputRoot.XML.TestData.Value3 = CAST(X'0189' as CHAR ccsid 1208);


Right now this throws an exception.

Thanks.
Back to top
View user's profile Send private message
Tibor
PostPosted: Tue Nov 23, 2004 4:00 pm    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

Look the Unicode Latin-1 codepage. Your character code is truly 00BD but this is not a UTF-8 code.

You have to convert this value to UTF-8 (e.g. with this UTF-8 Tool) and find your code is 0xC2BD!

Tibor
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 » Convert ASCII Characters
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.