IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Regarding the EBCDIC CCSID mapping.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakthikumarT

New User


Joined: 09 Apr 2009
Posts: 50
Location: Bangalore

PostPosted: Wed Jan 10, 2018 4:45 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2453
Location: Hampshire, UK

PostPosted: Wed Jan 10, 2018 7:35 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 10, 2018 8:48 pm
Reply with quote

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
View user's profile Send private message
sakthikumarT

New User


Joined: 09 Apr 2009
Posts: 50
Location: Bangalore

PostPosted: Wed Feb 07, 2018 2:05 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts XYplorer - EBCDIC to ASCII translatio... All Other Mainframe Topics 0
No new posts EBCDIC to ASCII conversion help All Other Mainframe Topics 1
No new posts EBCDIC (0037) to/from UTF-8 (1208) CLIST & REXX 2
No new posts Migrating AS400 to HIVE; Data type ma... All Other Mainframe Topics 1
No new posts mapping PLI structure to assembler co... PL/I & Assembler 3
Search our Forums:

Back to Top