NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
I-6
Considerations—INCLUDE SQLDA
name-length is the maximum number of bytes in the longest column or
parameter name that will be returned to the buffer.
{ RELEASE1 | RELEASE2 }
is an obsolete clause for specifying that the version of the SQLDA should be 1
(RELEASE1) or 2 (RELEASE2). You cannot use this clause if you also use
INCLUDE STRUCTURES. NonStop SQL/MP will not support this clause in the
future, so you should use INCLUDE STRUCTURES to specify the version instead.
CPRULES collation-buffer, collation-size
declares a collation buffer.
collation-buffer is the host variable name that is the name for the collation
buffer.
collation-size is the maximum number of bytes in the largest collation that
will be returned to the buffer.
Considerations—INCLUDE SQLDA
Version management considerations
By default, INCLUDE SQLDA declares a version 2 SQLDA. To request a different
version, use INCLUDE STRUCTURES prior to INCLUDE SQLDA.
The CPRULES clause can be used with NonStop SQL/MP versions 300 or later.
Examples—INCLUDE SQLDA
The following directives declare a version 310 SQLDA in a program:
EXEC SQL INCLUDE STRUCTURES ALL VERSION 310;
EXEC SQL INCLUDE SQLDA;
INCLUDE SQLSA Directive
INCLUDE SQLSA is a host program directive that declares the SQL statistics area
(SQLSA) in a host program.
The SQLSA is an area in which SQL returns statistics about the execution or preparation
of SQL statements. SQL clears the SQLSA before executing each statement, then
returns statistics after the execution of a DELETE, FETCH, INSERT, OPEN,
PREPARE, SELECT, or UPDATE statement. For PREPARE, statistics include
information about input parameters and output columns associated with the dynamic
SQL statement that was prepared.
For detailed information about the contents and use of the SQLSA, see the NonStop
SQL/MP programming manual for your host language.
INCLUDE SQLSA