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 » Validation of CCSID

Post new topic  Reply to topic
 Validation of CCSID « View previous topic :: View next topic » 
Author Message
nize
PostPosted: Thu Nov 12, 2009 2:16 am    Post subject: Validation of CCSID Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Hi,

I would like to know if you guys have any idea on a way to validate the CCSID of a BLOB in a WMQ/WMB environment.

Background:

sourceApp -> WMBFlow -> targetApp

The transport is WMQ (JMS).

The sourceApp uses a DB using Windows-1252, but the targetApp is limited to a DB using 8859-1. A table showing the differences in supported character repertoire is provided in http://www.alanwood.net/demos/charsetdiffs.html#a.

The programs transforming from/to DB/JMS use a UTF-8 encoding of the JMS messages. Therefore, the JMS pipe is not a bottleneck when it comes to characters.

Problem:
I want to ensure that no crap characters are stored in the DB of the targetApp. This validation must occur in WMQ/WMB since the sourceApp can not be trusted.

Solution idea:
In the WMBFlow: decode the BLOB to a STRING and then try to CAST the STRING to 8859-1. If it fails => message returned to sender. If it is successful: => forward the original message to the targetApp.

What do you think? Do you have other ideas?
Back to top
View user's profile Send private message
Gaya3
PostPosted: Thu Nov 12, 2009 8:38 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

i just want to keep one more link for reference


http://www-01.ibm.com/software/globalization/cdra/appendix_k.jsp
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
nize
PostPosted: Thu Nov 12, 2009 12:39 pm    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

hm... ok, I see that it is related, but could you please be a little bit more specific on which conclusions to make from it in the context of this topic?

Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Nov 12, 2009 4:44 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Solution idea:
In the WMBFlow: decode the BLOB to a STRING and then try to CAST the STRING to 8859-1. If it fails => message returned to sender. If it is successful: => forward the original message to the targetApp.
So you're proposing the following:
Code:
SET myUnicodeString = CAST sourceBLOB AS CHARACTER CCSID 1252;
SET targetBLOB = CAST myUnicodeString AS BLOB CCSID 8859-1;
-- Error handler catches any character conversion exceptions and returns message to sender

Sounds reasonable enough to me, altthough I suspect there are others better qualified than me to advise on this.
Back to top
View user's profile Send private message
nize
PostPosted: Fri Nov 13, 2009 4:58 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Yes, exactly!

Quote:

I suspect there are others better qualified than me to advise on this.


Dont be humble

Still, if anybody knows a better way to achieve my goal I am interested!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Nov 13, 2009 7:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert means that he doesn't spend a lot of time *using* broker, so he's not terribly qualified to help with usage questions.

I suppose another mechanism would be to parse each character in the string individually.

But it seems like taking the long way around.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Nov 13, 2009 8:11 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

mqjeff wrote:


I suppose another mechanism would be to parse each character in the string individually.


I have seen this method adopted in a system that was originally deployed using V2.1 and is still being used today under V6. IMHO, it is not elegant but does work.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » Validation of CCSID
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.