NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
I-8
Considerations—INCLUDE STRUCTURES
When you specify the VERSION CURRENT option, you must also include the
following line at the beginning of the C program source module:
#include <cextdecs (SQLGETSYSTEMVERSION)>
This line includes the prototype of the SQLGETSYSTEMVERSION procedure in
your C program. See the C/C++ Programmer's Guide for more info and examples
of programs that use this option.
If you specify version 330 of SQLSA in INCLUDE STRUCTURES, your pointers
are automatically expanded to accommodate the larger structure described under
Considerations—INCLUDE STRUCTURES
.
Considerations—INCLUDE STRUCTURES
Location and usage
INCLUDE STRUCTURES can appear anywhere in the host language compilation
unit where declarations are allowed, but it must precede any INCLUDE SQLCA,
INCLUDE SQLDA, or INCLUDE SQLSA directive.
You should specify INCLUDE STRUCTURES once in every SQL module that
contains an INCLUDE SQLCA, INCLUDE SQLDA, or INCLUDE SQLSA
directive. New programs should generally use the INCLUDE STRUCTURES ALL
VERSION form of the directive and specify the version of NonStop SQL/MP for
which the program is written.
(INCLUDE SQLCA, INCLUDE SQLDA, and INCLUDE SQLSA generate version
2 structures unless an INCLUDE STRUCTURES directive in the same module
specifies otherwise.)
Incompatibility of SQLSA version 330 with earlier versions
Version 330 of SQLSA returns more statistics information than earlier versions.
Additional information returned includes the total CPU time used by all sort
processes (SORTPROGs) and all Executor Server Processes (ESPs) in a query. The
size of the SQLSA structure has increased to accommodate these additions. In
version 330, all SQLSA 16 bit counters are 32 bit. All 32 bit INT (32) counters in
earlier versions are 64 bit (FIXED).
These version considerations apply only to SQLSA.
Incompatibility with obsolete RELEASE option
You cannot use INCLUDE STRUCTURES if you also use the RELEASE option in
the SQL directive or in the INCLUDE SQLDA directive. The host language
compiler returns an error if you do so. (The RELEASE option is an older option that
will be obsolete in the future. Use INCLUDE STRUCTURES instead.)
Examples—INCLUDE STRUCTURES
The following directive specifies version 330 for all structures declared later in the
compilation unit:
EXEC SQL INCLUDE STRUCTURES ALL VERSION 330;