An SQLDA is a collection of variables that is required for execution of the SQL DESCRIBE statement. The SQLDA variables are options that can be used by the PREPARE, OPEN, FETCH, EXECUTE, and CALL statements. An SQLDA communicates with dynamic SQL; it can be used in a DESCRIBE statement, modified with the addresses of host variables, and then reused in a FETCH statement.
SQLDAs are supported for all languages, but predefined declarations are provided only for C, REXX, FORTRAN, and COBOL. In REXX, the SQLDA is somewhat different than in the other languages; for information on the use of SQLDAs in REXX see the Embedded SQL Programming Guide
The meaning of the information in an SQLDA depends on its use. In PREPARE and DESCRIBE, an SQLDA provides information to an application program about a prepared statement. In OPEN, EXECUTE, FETCH, and CALL, an SQLDA describes host variables.
In DESCRIBE and PREPARE, if any one of the columns being described is either a LOB type, (88) or a distinct type, the number of SQLVAR entries for the entire SQLDA will be doubled. For example:
In EXECUTE, FETCH, OPEN, and CALL, if any one of the variables being described is a LOB type, (88) the number of SQLVAR entries for the entire SQLDA needs to be doubled. (89)
(88) LOB locators and file reference variables do not require doubled SQLDAs.
(89) Distinct types are not relevant in these cases since a host variable cannot be a distinct type.