SQL/MX 3.2 Programming Manual for C and COBOL (H06.25+, J06.14+)

Host Variables in C/C++ Programs
HP NonStop SQL/MX Release 3.2 Programming Manual for C and COBOL663854-002
3-6
Floating-Point Host Variables
The length l for the PICTURE data type corresponds to the number of digits in the
column value and cannot exceed 18. The value l-s is the number of digits in the
integral part of the column value.
PIC[TURE] [S]9(l-s)V9(s) COMP
is the same as {[signed] | unsigned} NUMERIC (p, s).
{[signed] | unsigned} DECIMAL(l, s)
specifies the data type of a target host variable for a column of one of these SQL
data types:
DECIMAL (l, s) [SIGNED|UNSIGNED]
PIC[TURE] [S] 9(l-s) V9(s) DISPLAY [SIGN IS LEADING]
The length l corresponds to the number of digits in the column value. The scale s
corresponds to the scale of the column value. The value l-s is the number of
digits in the integral part of the column value.
PIC[TURE] [S]9(l-s)V9(s)
is the same as {[signed] | unsigned} DECIMAL(l, s).
{[signed] | unsigned} short
specifies the data type of a target host variable for a column of the SQL data type:
SMALLINT [SIGNED|UNSIGNED]
{[signed] | unsigned} long
specifies the data type of a target host variable for a column of the SQL data type:
INT[EGER] [SIGNED|UNSIGNED}
long long
specifies the data type of a target host variable for a column of the SQL data type:
LARGEINT
Floating-Point Host Variables
With NonStop SQL/MX Release 2.x, you can choose to declare floating-point host
variables with a Tandem floating-point format or the ANSI IEEE floating-point format.
The storage and precision of IEEE floating-point data types is different from that of
Tandem floating-point data types, as noted in these summaries. Tandem floating-point
data types are stored in 4 bytes (REAL) or 8 bytes (DOUBLE), depending on their
Note. The unsigned long long data type is not supported in embedded SQL/MX programs.