|
View previous topic :: View next topic
|
| Author |
Message |
sakthikumarT
New User

Joined: 09 Apr 2009 Posts: 50 Location: Bangalore
|
|
|
|
Hi All,
I am replicating data from DB2 which is running on Z/OS to Non-IBM databases ( For example, Oracle, SYBASE, HANA).
In my source Database( DB2) the data encoding scheme is EBCDIC and the destination database encoding scheme is UTF-8.
During replication, our replication agent sends the source data as it is to the adapter, then the adapter replicates it to the destination database.
My doubt is from the adapter how can we figure out the source database encoding scheme.?I need to do the charset conversion based on the source encoding scheme.
I have tried this query to figure out the source DB encoding scheme. ( Please find the attachment for the same )
| Code: |
SELECT NAME,ENCODING_SCHEME,SBCS_CCSID, DBCS_CCSID, MIXED_CCSID
FROM SYSIBM.SYSDATABASE WHERE NAME ='LTMDB5' OR NAME ='LTMDB6'
OR NAME = 'LTMDB7';
---------+---------+---------+---------+---------+---------+---------+---------+
NAME ENCODING_SCHEME SBCS_CCSID DBCS_CCSID MIXED_CCSID
---------+---------+---------+---------+---------+---------+---------+---------+
LTMDB5 U 367 1200 1208
LTMDB6 E 1027 4396 5035
LTMDB7 A 1041 301 942
DSNE610I NUMBER OF ROWS DISPLAYED IS 3 ,,
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100
---------+---------+---------+---------+---------+---------+---------+---------+
|
As you can see for the database LTMDB6 encoding scheme is E ( EBCDIC) and also there are 3 different CCSID.
In order To do the charset mapping in the adapter, I need the Encoding the source database. which I figured out figure out, it is EBCDIC but which CCSID I should use for the mapping. here I can see 3 different values for LTMDB6 database.
Can someone help me out on this.? |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| Please do not post attachments. As you can see, using the code tags (which you should be able to do after 8 years) is sufficient. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Quote: |
| it is EBCDIC but which CCSID I should use for the mapping. |
Well, you need to identify the type of data stored in the DB2 table. SBCS means single byte character set, DBCS means double byte character set, and mixed means a mixed code character set. So if your application is dealing with only SBCS data, then you'd use CCSID 1027.
And if you are not aware, you should become aware that EBCDIC has multiple codings (0037 is the usual, but 1140 or 1047 -- or others -- may be needed for some applications). |
|
| Back to top |
|
 |
sakthikumarT
New User

Joined: 09 Apr 2009 Posts: 50 Location: Bangalore
|
|
|
|
Hi Robert,
Apologies for the Delayed Reply.Thanks a lot for the response.
In my understanding, the code pages 37, 500, and 1047 are all part of the EBCDIC encoding scheme.
so i should update the logic in my adapter in order to find the source data type whether its an SBCS or DBCS or MIxed Character set. based on that, the mapping should be done. correct me if am wrong. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|