SQL Programming Manual for TAL

Error and Status Processing
HP NonStop SQL Programming Manual for TAL527887-001
6-14
Declaring the SQLDA and Names Buffer
Declaring the SQLDA and Names Buffer
Use the INCLUDE SQLDA directive to declare a structure template for the SQLDA in a
TAL program using dynamic SQL statements. The syntax is:
sqlda-name
is the SQLDA structure name.
sqlvar-count
is the number of parameters for which you expect to specify input values or
number of columns for which you expect to receive output values. The default is 1.
names-buffer-name
is the SQLDA names buffer
name-string-size
is the number of characters in the longest parameter or column name expected in
the DESCRIBE or DESCRIBE INPUT statement.
A qualified column name can be from 1 to 30 characters long and is in the format:
table-name.column-name
A parameter name is an SQL identifier with a maximum of 30 characters.
RELEASE1 or RELEASE2
is the NonStop SQL release. The default is the release of the TAL compiler, unless it is
overridden by the release option parameter in the SQL directive.
Follow these guidelines when you use INCLUDE SQLDA:
Supply a place-holder value for the parameters or columns and the length of the
names buffer. Then allocate memory as needed.
Indicator variable names appear in the names buffer. If the names are short, the
INCLUDE SQLDA directive generates sufficient space for them; however, if the
names are long and you use many indicator variables, you should explicitly
allocate the names buffer separately from the INCLUDE SQLDA statement.
INCLUDE SQLDA ( sqlda-name [ , sqlvar-count ]
[ , names-buffer-name, name-string-size ]
[ , { RELEASE1 | RELEASE2 } ])