Defining SQL descriptor areas (SQLDA) in REXX

If your program includes certain SQL statements, you must define at least one SQL descriptor area (SQLDA). Depending on the context in which it is used, the SQLDA stores information about prepared SQL statements or host variables. This information can then be read by either the application program or Db2.

Procedure

To define SQL descriptor areas:

Code the SQLDA declarations directly in your program.

Each SQLDA consists of a set of REXX variables with a common stem. The stem must be a REXX variable name that contains no periods and is the same as the value of descriptor-name that you specify when you use the SQLDA in an SQL statement. For more information, see The REXX SQLDA.

Restrictions:
  • You must place SQLDA declarations before the first SQL statement that references the data descriptor, unless you use the TWOPASS SQL processing option.
  • You cannot use the SQL INCLUDE statement for the SQLDA, because it is not supported in COBOL.