SQL Programming Manual for TAL
Error and Status Processing
HP NonStop SQL Programming Manual for TAL—527887-001
6-17
Declaring the SQLDA and Names Buffer
Table 6-4. SQLDA Fields (page 1 of 2)
Field Name Description
SQLDA^EYE^CATCHER A constant declared by the system. If you requested an SQLDA
structure of a release that is different from the release of the
SQL compiler, SQLDA^EYE^CATCHER appears as either
SQLDA^EYE^CATCHER^R1 or SQLDA^EYE^CATCHER^R2.
EYE^CATCHER Identifying field that your program must initialize with the
system-declared SQLDA^EYE^CATCHER literal. NonStop SQL
statements do not return values to EYE^CATCHER.
NUM^ENTRIES Number of input parameters or output variables this SQLDA
structure can accommodate. If your program used INCLUDE
SQLDA, TAL sets NUM^ENTRIES to the number you specified
for sqlvar^count. If your program allocated the SQLDA
dynamically, the program must supply a value for
NUM^ENTRIES.
SQLVAR Descriptions for input parameters or output variables. The
DESCRIBE INPUT and DESCRIBE statement returns one
SQLVAR entry for each input parameter or each output
variable.
DATA^TYPE Data type of the parameter or output variable.
DATA^LEN The length in DATA^LEN depends on the data type as follows:
•
For a fixed-length character string, DATA^LEN contains the
number of characters in the string.
•
For a variable-length character string, DATA^LEN contains
the maximum number of characters allowed in the string
(not including the two bytes of length).
•
For both binary and decimal numeric items, DATA^LEN
bits 0:7 contain the decimal scale of the item.
•
For a binary numeric item, DATA^LEN bits 8:15 contain the
byte length of the item (2, 4, or 8).
•
For a decimal numeric item, DATA^LEN bits 8:15 contain
the byte length of the item (the number of characters).
•
For a DATETIME or INTERVAL item, DATA^LEN bits 0:7
contain a code for the range of DATETIME fields. Bits 8:15
contain the storage size for the item.
PRECISION * PRECISION depends on the data type as follows:
For a FLOAT or binary numeric column, PRECISION contains
the numeric precision.
For a date-time or INTERVAL item, PRECISION 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.