NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
I-5
Examples—INCLUDE SQLCA
Examples—INCLUDE SQLCA
The following directives declare a version 315 SQLCA in a program:
EXEC SQL INCLUDE STRUCTURES ALL VERSION 315;
EXEC SQL INCLUDE SQLCA;
INCLUDE SQLDA Directive
INCLUDE SQLDA is a dynamic SQL directive that declares an SQL descriptor area
(SQLDA) and optional names and collation buffers in a host program that uses dynamic
SQL.
SQL uses the SQLDA with the dynamic SQL statements DESCRIBE and FETCH (to
pass information about output columns) and DESCRIBE INPUT and EXECUTE (to
pass information about input parameters). SQL uses the names buffer and collation
buffer—which you can declare separately or with INCLUDE SQLDA—to pass column
names and collation information returned by DESCRIBE and to pass input parameter
names returned by DESCRIBE INPUT.
For detailed information about the contents and use of the SQLDA, see the NonStop
SQL/MP programming manual for your host language.
sqlda-name
is a host identifier that is the name for the SQLDA.
sqlvar-count
is an integer that specifies the maximum number of input parameters (including
indicator parameters) or output columns to be described in the SQLDA at one time.
The default is 1.
(PREPARE returns the number of input or output parameters in a statement to the
INPUT-NUM or OUTPUT-NUM fields of the SQLSA when it compiles the
statement. You can use these values for the corresponding SQLDA sqlvar-
count.)
names-buffer, name-length
declares a names buffer.
names-buffer is the host variable name that is the name for the names buffer.
INCLUDE SQLDA ( sqlda-name [, sqlvar-count ]
[ , names-buffer, name-length ]
[ , { RELEASE1 | RELEASE2 } ]
[ , CPRULES collation-buffer, collation-size ] )