DATE fields can be returned to character fields (not byte) if the length of the field can hold the conversion type requested by the DATE option. See “DATE(D|E|I|J|U) -d D|E|I|J|U” on page 71.
The byte string is moved one byte at a time for the length of the receiving variable.
No data conversion is performed and the application is responsible for handling the returned data.
A CHAR host variable is defined as a one character char type (that is, char var1).
VARCHAR is defined as a structure having a two byte length field and a character array data field.
A character string is defined as an array of two or more elements of char type (that is, char var1), which is terminated by a terminating null character ('\0').
DATE in its natural format (such as a DESCRIBE for a dynamic request) is equivalent to INTEGER.
DATE can also be returned to a CHAR, VARCHAR or character string field, provided the length of the receiving field can hold the format requested.
The character variable must be at least length 8 to receive the date in any of the allowable formats. The character string type variable must be at least length 9 (date plus the terminating null character of '\0') to receive the data.
C does not provide a natural DECIMAL data type. Memory can be allocated, however, to hold the value and the SQLDA set to reflect a DECIMAL type host variable. The application then is responsible for manipulation of the data.
The Teradata SQL FLOAT, REAL and DOUBLE PRECISION types are equivalent to a DOUBLE PRECISION FLOAT.
PP2 recognizes both SINGLE and DOUBLE PRECISION FLOAT host variable types.
Fractional portions of the value can be lost in conversion to a type other than DOUBLE PRECISION FLOAT.
Note: No host GRAPHIC-type variable declaration for the C language is recognized by PP2.