SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)
Host Variables in C/C++ Programs
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL—663854-005
3-8
Using Corresponding SQL and C Data Types
double
specifies the data type of a target host variable for a column of one of these SQL
data types:
FLOAT [(p)]
DOUBLE PRECISION
IEEE floating-point format FLOAT (p) and DOUBLE are stored in 8 bytes with 52
bits of binary precision and 11 bits of exponent. The storage size for the IEEE
floating-point format is implementation-defined. This is ANSI-compliant behavior.
The maximum precision for an IEEE data type is 52. The precision corresponds to
the precision of the column value.
For the corresponding SQL and C host variable data types for FLOAT data types, see
Table 3-2 on page 3-10. For the generated C data types for NUMERIC, PIC, and
DECIMAL, see Table 3-1 on page 3-9.
Using Corresponding SQL and C Data Types
Table 3-1 lists the corresponding SQL data types, C host variable data types, and
translated C declarations for the NUMERIC, DECIMAL, PIC, SMALLINT and
LARGEINT data types.
Table 3-2 on page 3-10 lists the corresponding SQL data types, C host variable data
types, and translated C declarations for the FLOAT data types.
Table 3-3 on page 3-11 lists the corresponding SQL data types, C host variable data
types, and translated C declarations for the date-time data types.
Most SQL data types with scale have extended host variable data types. You can
specify a C/C++ variable as a host variable if it has a corresponding SQL data type.










