16.20 - Encoding Controls for Unicode Sessions - Basic Teradata Query

Basic Teradata Query Reference

Basic Teradata Query
October 2018
Programming Reference

Workstation BTEQ includes two encoding controls for supporting Unicode. The first control, I/O Encoding, handles the user interface for BTEQ. On input, that includes stdin and RUN files. On output, it includes stdout, stderr, and MESSAGEOUT files.

The second control, Session Character Set Encoding, handles the communication to and from the Teradata Database along with the encoding of certain files, which include import files, export files, and source files for SQL (internal) stored procedures. Other external source files (for user-defined functions, user-defined methods, and external stored procedures) are an exception and must always be in the native encoding (ASCII for workstation clients or EBCDIC for mainframe clients).

Having two encoding values enables the user to customize the BTEQ execution environment. All files and communication are in the same encoding when not using Unicode. But when UTF8 or UTF16 are used as the session character set, the I/O encoding can be either UTF8 or UTF16.

The following diagram shows how the two encoding controls affect BTEQ.

Coding Controls Effect on BTEQ