Replicating From a Source that Contains Both ASCII and EBCDIC
When replicating to or from a DB2 source system to a target that has a different character set, some consideration must be given to the encoding of the character data on the DB2 source if it contains a mix of ASCII and EBCDIC data. Character set conversion by any given Replicat requires source data to be in a single character set.
The source character set is specified in the trail header. Thus, the Oracle GoldenGate trail can contain either ASCII or EBCDIC data, but not both. Unicode tables are processed without any special configuration and are exempt from the one-character set requirement.
With respect to a source that contains both character encoding types, you have the following options:
-
You can use one Extract for all of your tables, and have it write the character data to the trail as either ASCII or as EBCDIC.
-
You can use different Extracts: one Extract to write the ASCII character data to a trail, and another Extract to write the EBCDIC character data to a different trail. You then associate each trail with its own data pump process and Replicat process, so that the two data streams are processed separately.
To output the correct character set in either of those scenarios, use the TRAILCHARSETASCII
and TRAILCHARSETEBCDIC
parameters. The default is TRAILCHARSETEBCDIC
. Without these parameters, ASCII and EBCDIC data are written to the trail as-is. When using these parameters, note the following:
-
If used on a single-byte DB2 subsystem, these parameters cause Extract to convert all of the character data to either the ASCII or EBCDIC single-byte CCSID of the subsystem to which Extract is connected, depending on which parameter is used (except for Unicode, which is processed as-is).
-
If used on a multi-byte DB2 subsystem, these parameters cause Extract to capture only ASCII or EBCDIC tables (and Unicode). Character data is written in either the ASCII or EBCDIC mixed CCSID (depending on the parameter used) of the DB2 z/OS subsystem to which Extract is connected.