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 » CCSID Insert database - char conversion

Post new topic  Reply to topic
 CCSID Insert database - char conversion « View previous topic :: View next topic » 
Author Message
ma.eyal
PostPosted: Sun Apr 30, 2006 11:36 pm    Post subject: CCSID Insert database - char conversion Reply with quote

Novice

Joined: 13 Sep 2005
Posts: 15
Location: Israel

Hello.

We had stambled into a problem with character conversions and inserting given data from a message into the database when working with hebrew and unicode.

Our Queue Manager (v5.31) is running under CCSID 1208, we work with a db2 on aix with CCSID 1208, and the message arriving is with 1208 code page (originated from a Z/OS system sent to the aix using SNA).

When the message arrives to the wbi (v5), we are trying to put a field into the database without any data manipulation.

What we encountered was that the data inserted into the database is invalid. The data is not readable and when selecting the hex of the field to check the data, we get that its not equal to the original value.

If the original value in hex was :
"2020d7a8d79e2020d7a2d795d7a02020d7aad7a8d791d797"
the one in the database is
"20207f7f20207f7f7f20207f7f7f7f"

We can fix this problem by putting te data as a blob into the database, which saves the original hex values. But then we cant watch or update th data.

Anyone has encountered this sort of a problem?

Thank you.
Back to top
View user's profile Send private message
Kateel
PostPosted: Tue May 02, 2006 6:28 am    Post subject: Reply with quote

Novice

Joined: 01 May 2006
Posts: 17

Since the message is coming from Z/OS, you need to convert the message from EBCDIC to ASCII. Does your sender channel from Z/OS has convert option set ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 02, 2006 4:34 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Kateel wrote:
Since the message is coming from Z/OS, you need to convert the message from EBCDIC to ASCII. Does your sender channel from Z/OS has convert option set ?


Since this is inside Broker, Broker automatically converts all the data in the message tree into Unicode as it parses the message.

Using sender channel conversion is always a bad idea.

I do not understand the mention of SNA. Are your MQ channels running over SNA? What does you mean?

Are you sure that the messages are arriving to Broker with the proper Unicode characters for the hebrew characters you are trying to write?

Are you sure that you have properly configured your database to handle this data? I ran into a vaguely similar problem with WAS and Oracle where WAS needed to have NLS_LANGUAGE environment variables configured to prevent the Oracle client from converting the data improperly.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ma.eyal
PostPosted: Wed May 03, 2006 10:28 pm    Post subject: Reply with quote

Novice

Joined: 13 Sep 2005
Posts: 15
Location: Israel

Hello.

I have done some investigation about our system.

The system sending the message from z/os is an event triggering sytem provided by IBM, which creates messages in a ccsid of 1208 and sending them formated in xml to the wbi (which sits on aix).

The system reads information from the db2 log, and does not convert the data from 424 to 1208.

So what I get is a message with a mix of UTF-8 base message with EBCDIC fields.

So if I cast the given field inside the message to ccsid 424 in the flow, I get its hex values correctly, but I still have a problem converting it to 1208, since the flow is running under 1208 code page.

I have tried all sort of conversions with CAST, but was unable to cast the field correctly to 1208. Anyone has encoutered this sort of a problem and can give some advice?

Thank you.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 04, 2006 5:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you reassign the fields that hold data in the 424 codepage with the values of the CAST result, then you will have converted the data into 1208.

Like so:
Set OutputRoot.XML.DB2Message.424Field1 = CAST(InputRoot.XML.Db2Message.424Field1 ENCODING InputRoot.Properties.Encoding CodedCharSetId 424);

So insert a Compute node to do this to all the fields, and then go to the parts of your flow that want to write stuff into your database.

Also, you're reading the db2 logs? Why?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ma.eyal
PostPosted: Thu May 04, 2006 5:41 am    Post subject: Reply with quote

Novice

Joined: 13 Sep 2005
Posts: 15
Location: Israel

Thank you, I will try that and post if I was able to fix the problem.

We are using IBM's Event Publisher, which follows log changes and generate a MQ message in UTF-8.
The problem with it is that it sends the data "as is" without any conversions.

Its a black box to us and unchangable.

Good day.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu May 04, 2006 8:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

AH! Okay, using Event Publisher is a bit different.

Open a PMR!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ma.eyal
PostPosted: Sat May 06, 2006 11:04 pm    Post subject: Reply with quote

Novice

Joined: 13 Sep 2005
Posts: 15
Location: Israel

Thank you for the help jeff.

We tried the suggested and a few more conversion options but none of them worked.

We concluded that the information is send wrongly converted from the Z/Os because of the mismatch message data/ccsid coming from the Event Publiser. Using a small batch worked, but we need to use the Event Publisher...

I guess there is no other way except opening a PMR and hoping for the best
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 » CCSID Insert database - char conversion
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.