COBOL programs that include dynamic SQL must have an SQL Descriptor Area (SQLDA) defined. This definition is usually accomplished by including the SQLDA copybook provided with your COBOL system.
The default SQLDA copybook used by the SQL Option preprocessor is not mainframe DB2 compatible. Instead it is designed for easy compatibility if you are upgrading from older version of XDB or SQL Option software.
A mainframe compatible SQLDA is provided in the %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\source\xdb directory with filename of sqlda.cpy. If you want to use that copybook instead, just rename it. You then need to compile all programs that use this copybook or SQLDA's defined using the mainframe SQLDA structure with the SQL preprocessor directive SQLDA-VER=1 or the program will not map data properly and probably trap.
The SQLDA holds information about dynamic SQL queries, and is required for allocating the proper amount of space for the query.
For more information about dynamic SQL and the SQLDA, see the topic Using Dynamic SQL in COBOL. For a complete description of the SQLDA structure, see the SQL Reference. Refer to your preprocessor documentation on the use of pointer variables and for additional information on dynamic SQL in COBOL programs.