SQL/MP Programming Manual for COBOL85
Converting COBOL Programs
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
D-4
Generating a Version 2 SQLDA Structure
DATA-LEN DATA-LEN depends on the data type as follows:
Fixed-length character The number of bytes in the string.
Variable-length character The maximum number of bytes in the string.
Decimal numeric Bits 0:7 contain the decimal scale.
Bits 8:15 contain the byte length of the item.
Binary numeric Bits 0:7 contain the decimal scale.
Bits 8:15 contain the byte length of the item (2,
4, or 8).
Date-time or INTERVAL Bits 0:7 contain one of these codes for the
range of date-time fields.
Bits 8:15 contain the storage size of the item.
1 Year to Year 11 Year to Minute 20 Day to Minute
2 Month to Month 12 Year to Second 21 Day to Second
3 Day to Day 13 Year to Fraction 22 Day to Fraction
4 Hour to Hour 14 Month to Day 23 Hour to Minute
5 Minute to Minute 15 Month to Hour 24 Hour to Second
6 Second to Second 16 Month to Minute 25 Hour to Fraction
7 Fraction to Fraction 17 Month to Second 26 Minute to Second
8 Year to Month 18 Month to Fraction 27 Minute to Fraction
9 Year to Day 19 Day to Hour 28 Second to
Fraction
10 Year to Hour
PRECISION The PRECISION value depends on the data type as follows:
Binary numeric PRECISION contains the numeric precision.
Date-time or INTERVAL Bits 0:7 contain the leading field precision. Bits
8:15 contain the fraction precision. If the
FRACTION field is not included, bits 8:15 are
0.
Table D-2. Version 2 SQLDA Structure Fields (page 2 of 3)
Field Name Description