Conversion of character data

 

When character data is transferred between machines, it must be converted to a form that the receiving machine can use.

For example, when data is transferred between a DB2 Connect™ server and a host or System i database server, it is usually converted from a server code page to a host CCSID, and vice versa. If the two machines use different code pages or CCSIDs, code points are mapped from one code page or CCSID to the other. This conversion is always performed at the receiver.

Character data sent to a database consists of SQL statements and input data. Character data sent from a database consists of output data. Output data that is interpreted as bit data is not converted. For example, data from a column declared with the FOR BIT DATA clause. Otherwise, all input and output character data is converted if the two machines have different code pages or CCSIDs.

For example, if DB2 Connect is used to access data, the following happens:

  1. DB2 Connect sends an SQL statement and input data to OS/390® or z/OS®.

  2. DB2 Universal Database™ for z/OS and OS/390 converts the SQL statement and data to the host server's code page and then processes the data.

  3. DB2 Universal Database for z/OS and OS/390 sends the result back to the DB2 Connect server.

  4. DB2 Connect converts the result to the code page of the user's environment.

For bidirectional languages, a number of special "BiDi CCSIDS" have been defined by IBM® and are supported by DB2 Connect.

If the bidirectional attributes of the database server are different from those of the client you can use these special CCSIDS to manage the difference.

Refer to the supported territory codes and code pages topic for the supported conversions between code pages on the DB2 Connect and CCSIDs on the host or System i server.

Parent topic: DB2 Connect

Related concepts
Character conversion guidelines

Related reference
Supported territory codes and code pages