CONVERT_CCSID - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

The CONVERT_CCSID function performs code page conversion of source data from one encoding scheme (CCSID) or code page to another. While the conversion of source to target encoding schemes is normally handled automatically, this function allows individual source fields or columns to be explicitly converted. Use of this function is typically limited since the encoding scheme is generally specified at a system level. The Apply Engine, by default assumes that Character Encoding on z/OS is Code Page 1047, Code Page 819 on Linux and UNIX and Code Page 1252 on Windows. If an Apply Engine runs on a platform different from the target datastore, an IMS to Oracle Engine for example, the engine can be instructed to convert all source data to the target system's encoding scheme using the OPTIONS APPLICATION ENCODING SCHEME = <ccsid> command. Code page translation may also be performed by the database communications interface.

This function is therefor used only In those cases where individual source fields are not encoded in the same code page as the source default.

Category

Specialized

Syntax
CONVERT_CCSID(<source_field>,<to_CCSID>,<from_CCSID>)
Parameters and Descriptions
Parameter Description
source_field Source field, usually qualified by source description alias requiring translation
to_CCSID The desired target field/column encoding scheme
from_CCSID The source field encoding scheme
true_action One or more actions to be taken if a WHEN is true (1). A true_action is usually one or more other functions and or called Procedures.
false_action One or more actions to be taken if all of the WHEN's are evaluated as false (0). A false_action is usually one or more other functions and or called Procedures.

Example

Some source address lines contain data requiring encoding up to 32 bits per character and the source application chose to use UTF-16 (CCSID 1200) encoding. The target Relational database utilizes UTF-8 encoding for all Character data. Convert the ADDRESS_LINE_1 field from the UTF-16 (CCSID 1200) extended encoding scheme to UTF-8 (CCSID 1208).
T_EMPLOYEE.address_line_1        = CONVERT_CCSID(EMPLOYEE.ADDRESS_LINE_1,1208,1200)
Note: Before making the determination to perform explicit code page conversion or rely on automatic conversion it is important to know the code page of the intended target. The methods for making that determination vary from one target to another. The following list of commands or methods will return the code page of the respective targets.

Oracle - select * from nls_database parameters where parameter = 'NLS_CHARACTERSET';

DB2/LUW -

SQL