Character String Padding
C strings are padded differently in the Teradata compatible and ANSI compatible environments, as shown in the next table.
TRANSACT Mode |
Padding Character |
ANSI |
blanks |
Teradata |
nulls |
For example, consider the following comparison in which the EBCDIC string ABCDE is fetched into a host variable defined as char[7].
TRANSACT Mode |
Host Variable Data |
ANSI |
X’C1C2C3C4C54000’
|
Teradata |
X’C1C2C3C4C50000’
|
The ANSI string is padded with blanks, while the non-ANSI string is padded with nulls. The process is similar for ASCII strings.