SQL/MP Programming Manual for COBOL

Dynamic SQL Operations
HP NonStop SQL/MP Programming Manual for COBOL529758-003
10-12
Defining Storage for Input and Output Parameters
Table 10-2. SQLDA Structure Fields (page 1 of 2)
Field Name Description
EYE-CATCHER An identifying field that a program must initialize. SQL/MP does not
return a value to EYE-CATCHER.
NUM-ENTRIES The number of input or output parameters the SQLDA structure can
accommodate.
SQLVAR Group item that describes input parameters or database columns. The
DESCRIBE INPUT and DESCRIBE statements return one SQLVAR entry
for each input parameter or each output variable.
DATA-TYPE The data type of the parameter. For the values used for each data type,
see Table 10-3
on page 10-13.
DATA-LEN The DATA-LEN value depends on the data type:
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 the field. 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:
Binary numeric 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.
Character and VARCHAR The character set ID
(0 = UNKNOWN):
1 KANJI 101 ISO88591 104 ISO88594 107 ISO88597
12 KSC5601 102 ISO88592 105 ISO88595 108 ISO88598
103 ISO88593 106 ISO88596 109 ISO88599