SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Dynamic SQL Rowsets
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
12-9
Exclusive Use of VARIABLE_POINTER and
INDICATOR_POINTER
If the value specified for this descriptor item field does not meet these guidelines, an
execution time error of memory access violation or data type mismatch can result.
Exclusive Use of VARIABLE_POINTER and
INDICATOR_POINTER
When you use rowset host variables to transfer data to and from a database,
VARIABLE_DATA and INDICATOR_DATA descriptor item fields must not be used.
Data can be exchanged between an application and a database only by using the
VARIABLE_POINTER and INDICATOR_POINTER descriptor fields.
For information on using the VARIABLE_POINTER and INDICATOR_POINTER
descriptor fields, see Section 10, Dynamic SQL With Descriptor Areas.
Set the ROWSET_VAR_LAYOUT_SIZE field before setting the VARIABLE_POINTER
field to the address of a rowset host variable. Similarly for indicators, set the
ROWSET_IND_LAYOUT_SIZE field before setting the INDICATOR_POINTER field to
the address of a rowset indicator host variable. An error occurs if the
VARIABLE_DATA or INDICATOR_DATA descriptor item fields are used after the
ROWSET_VAR_LAYOUT_SIZE or ROWSET_IND_LAYOUT_SIZE fields have been
set to nonzero values.
Using the GET DESCRIPTOR Statement
Use the GET DESCRIPTOR statement to obtain the value of rowset specific descriptor
fields, described in Using the SET DESCRIPTOR Statement on page 12-5. This
strategy is useful after a DESCRIBE INPUT statement has been issued, and you want
to determine the value set by DESCRIBE for these descriptor fields. You can also use
this statement to check a previously issued SET DESCRIPTOR statement.
The syntax is:
GET DESCRIPTOR descriptor-name get-descriptor-info
descriptor-name is:
[GLOBAL | LOCAL] value-specification
get-descriptor-info is:
variable-name = COUNT
| variable-name= ROWSET_SIZE
| VALUE item-number get-item-info [, get-item-info]...
get-item-info is:
variable-name = descriptor-item-name
descriptor-item-name is:
ROWSET_VAR_LAYOUT_SIZE
| ROWSET_IND_LAYOUT_SIZE
| other-descriptor-item-names