IBM Books

Administrative API Reference

SQLOPT

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

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

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 sqlopt
{
  SQL_STRUCTURE sqloptheader header;
  SQL_STRUCTURE sqloptions   option[1];
};
/* ... */
 



/* 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
*
 


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]