SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

Host Variables in COBOL Programs
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
4-4
COBOL Host Variable Data Types
precision is the number of digits allowed in period 1. If period2 is SECOND, it
can have a fractional-precision up to 6 digits. The fractional-precision is the
number of digits of precision after the decimal point. The default for leading-
precision is 2, and the default for fractional-precision is 6. If the single-field is
SECOND, the leading-precision is the number of digits of precision before the
decimal point, and the fractional-precision is the number of digits of precision after
the decimal point.
PIC[TURE] [S]9(l-s)V9(s) COMP
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) V9(s) | V9(s)} COMP
PIC[TURE] [S]9(p) COMP
specifies the data type of a target host variable for a column of one of these SQL
data types, depending on the precision:
SMALLINT [SIGNED|UNSIGNED]
INT[EGER] [SIGNED|UNSIGNED]
LARGEINT
The precision p corresponds to the precision of the column value.
PIC[TURE] S9(l-s)V9(s) DISPLAY SIGN LEADING SEPARATE
specifies the data type of a target host variable for a column of one of these SQL
data types:
DECIMAL (l, s) SIGNED
PIC[TURE] S9(l-s) V9(s) DISPLAY SIGN IS LEADING
p precision of the column value
s scale of the column value
l length; number of digits in the column value
l-s number of digits in the integral part of the column value
l length; number of digits in the column value
s scale of the column value
l-s number of digits in the integral part of the column value