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-6
Numeric Host Variables
Numeric Host Variables
{[signed] | unsigned} NUMERIC (p, s)
specifies the data type of a target host variable for a column of one of these SQL
data types:
NUMERIC [(p, s)] [SIGNED|UNSIGNED]
PIC[TURE] [S] {9(l-s) [V[9(s)]] | V9(s)} COMP
The precision p corresponds to the precision of the column value. The scale s
corresponds to the scale of the column value. The precision p for the NUMERIC
data type cannot exceed 128. If you specify a precision greater than 128, the error
"Error 13061 - EXC_BAD_UNS_NUM_PREC," is returned.
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} int
specifies the dat
a type of a target host variable for a column of the SQL data type:
INT[EGER] [SIGNED|UNSIGNED}










