Character Truncation - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Character truncation is handled identically under all compatibility modes. For example, consider the EBCDIC string ABCDE is fetched into a host variable defined as char[4].

The host variable contains X’C1C2C300’, which is the three leftmost characters of the original string plus a terminating null. The process is similar for ASCII strings.

If TRANSACT is set to ANSI, truncation of any nonblank and nonzero character produces a warning SQLCODE (+902) and SQLSTATE (01004).