Administrative API Reference

SQLOPT

This structure is used to pass bind options to sqlabndx - Bind, precompile options to sqlaprep - Precompile Program, and rebind options to sqlarbnd - Rebind.

Table 62. 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 63. 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 64. Fields in the SQLOPTIONS Structure
Field Name Data Type Description
TYPE INTEGER Bind/precompile/rebind option type.
VAL INTEGER Bind/precompile/rebind option value.
Note:The TYPE and VAL fields are repeated for each bind/precompile/rebind option specified.

For more information about valid values for TYPE and VAL, see sqlabndx - Bind, sqlaprep - Precompile Program and sqlarbnd - Rebind.

Language Syntax

C Structure



/* File: sql.h */
/* Structure: SQLOPT */
/* ... */
SQL_STRUCTURE sqlopt
{
  SQL_STRUCTURE sqloptheader header;
  SQL_STRUCTURE sqloptions   option[1];
};
/* ... */
 



/* File: sql.h */
/* Structure: SQLOPTHEADER */
/* ... */
SQL_STRUCTURE sqloptheader
{
  sqluint32 allocated;
  sqluint32 used;
};
/* ... */
 



/* File: sql.h */
/* Structure: SQLOPTIONS */
/* ... */
SQL_STRUCTURE sqloptions
{
  sqluint32 type;
  sqluint32 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
*
 


[ Top of Page | Previous Page | Next Page ]