This structure is used to pass bind options to sqlabndx - Bind, and precompile options to sqlaprep - Precompile Program.
Table 51. Fields in the SQLOPT Structure
| Field Name | Data Type | Description |
|---|---|---|
| HEADER | Structure | An sqloptheader structure. |
| OPTION | Array | An array of sqloptions structures. The number of elements in this array is determined by the value of the allocated field of the header. |
Table 52. Fields in the SQLOPTHEADER Structure
| Field Name | Data Type | Description |
|---|---|---|
| ALLOCATED | INTEGER | Number of elements in the option array of the sqlopt structure. |
| USED | INTEGER | Number of elements in the option array of the sqlopt structure actually used. This is the number of option pairs (TYPE and VAL) supplied. |
Table 53. Fields in the SQLOPTIONS Structure
| Field Name | Data Type | Description | ||
|---|---|---|---|---|
| TYPE | INTEGER | Bind/precompile option type. | ||
| VAL | INTEGER | Bind/precompile option value. | ||
| ||||
For more information about valid values for TYPE and VAL, see sqlabndx - Bind and sqlaprep - Precompile Program.
Language Syntax
C Structure
/* File: sql.h */
/* Structure: SQLOPT */
/* ... */
SQL_STRUCTURE sqloptheader
{
unsigned long allocated;
unsigned long used;
};
/* ... */
|
/* File: sql.h */
/* Structure: SQLOPTHEADER */
/* ... */
SQL_STRUCTURE sqloptheader
{
unsigned long allocated;
unsigned long used;
};
/* ... */
|
/* File: sql.h */
/* Structure: SQLOPTIONS */
/* ... */
SQL_STRUCTURE sqloptions
{
unsigned long type;
unsigned long val;
};
/* ... */
|
COBOL Structure
* File: sql.cbl
01 SQLOPT.
05 SQLOPTHEADER.
10 ALLOCATED PIC 9(9) COMP-5.
10 USED PIC 9(9) COMP-5.
05 SQLOPTIONS OCCURS 1 TO 50 DEPENDING ON ALLOCATED.
10 SQLOPT-TYPE PIC 9(9) COMP-5.
10 SQLOPT-VAL PIC 9(9) COMP-5.
10 SQLOPT-VAL-PTR REDEFINES SQLOPT-VAL
*
|