SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
I-8
Considerations—INCLUDE STRUCTURES
Considerations—INCLUDE STRUCTURES
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.)
Version 330 of SQLSA returns more statistics information than earlier versions.
Additional information returned includes the total processor 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.
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
This directive specifies version 330 for all structures declared later in the
compilation unit:
EXEC SQL INCLUDE STRUCTURES ALL VERSION 330;
This directive specifies version 310 for all SQLCA structures declared later in the
compilation unit, but version 315 for all SQLDA and SQLSA structures declared
later in the compilation unit:
EXEC SQL INCLUDE STRUCTURES SQLCA VERSION 310
SQLDA VERSION 315
SQLSA VERSION 315;