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.
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).