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 » Multiple databases and encodings

Post new topic  Reply to topic
 Multiple databases and encodings « View previous topic :: View next topic » 
Author Message
Seires
PostPosted: Wed Mar 28, 2007 6:00 am    Post subject: Multiple databases and encodings Reply with quote

Newbie

Joined: 28 Mar 2007
Posts: 3

Hi all,

I've faced a problem with Message Broker v6:
How to configure Message Broker if I need to get data from two different encoding(non-Unicode) databases within the same message flow?

I've found that such environment variables as MQSI_LOCAL_CCSID, LC_ALL and LANG can help in case of a single database, but what if there are two or more?

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 28, 2007 2:10 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Check out the possible ns_lang attributes of the driver. Perhaps it will support some ODBC settings...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Mar 28, 2007 2:19 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think the purpose of the env variables is to help Broker translate from whatever language/code set the database data is in, into Unicode...

So making sure that they are set to the correct values for the actual broker environment will ensure that they should work (as well as they can for each particular conversion) for databases running in any other codepage. But if there isn't a valid conversion between the two code pages (broker and one db) then only that db will be affected.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Seires
PostPosted: Thu Mar 29, 2007 5:58 am    Post subject: Reply with quote

Newbie

Joined: 28 Mar 2007
Posts: 3

jefflowrey wrote:
I think the purpose of the env variables is to help Broker translate from whatever language/code set the database data is in, into Unicode...

So making sure that they are set to the correct values for the actual broker environment will ensure that they should work (as well as they can for each particular conversion) for databases running in any other codepage. But if there isn't a valid conversion between the two code pages (broker and one db) then only that db will be affected.


In my case I have two databases with different encodings. So I should let Broker to know somehow that ODBC source A has ccsid=1251 and source B has cssid=1252. The env variables allow only one global translation(1251 or 1252) to be set, thus I doubt that I can use them.
I'm not very advanced in ODBC and I don't know if ODBC connections provide any information about database encoding, but that could be the place to specify encoding for each connection.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 29, 2007 3:33 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No.

I think you need to tell Broker what it's "local" codepage is, which can be anything you want.

This is what the environment variables do.

Then, ODBC and the ODBC drivers will see that the remote database is running under a different codepage, and use the necessary conversion tables to change the data in the remote codepage into the local codepage.

See?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Seires
PostPosted: Wed Apr 18, 2007 3:22 am    Post subject: Reply with quote

Newbie

Joined: 28 Mar 2007
Posts: 3

jefflowrey wrote:
No.

I think you need to tell Broker what it's "local" codepage is, which can be anything you want.

This is what the environment variables do.

Then, ODBC and the ODBC drivers will see that the remote database is running under a different codepage, and use the necessary conversion tables to change the data in the remote codepage into the local codepage.

See?


Not really

UCS-2 is used in Broker for the internal data. So if the database encoding could be sorted out via ODBC, then Broker should know which conversion tables should be applied. Why Broker should know about any local codepages if all what it needs to do is conversion from UCS-2 to the remote db encoding and back again?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 18, 2007 2:40 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
UCS-2 is used in Broker for the internal data. So if the database encoding could be sorted out via ODBC, then Broker should know which conversion tables should be applied. Why Broker should know about any local codepages if all what it needs to do is conversion from UCS-2 to the remote db encoding and back again?

Because the odbc call is being made against the local os and it's char set.
The odbc call recognizes that and sets conversions in consequence. So the Broker must pickup/send in the local charset....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Multiple databases and encodings
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.