SQL/MP Programming Manual for COBOL85
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
9-1
9 Error and Status Reporting
This section provides information about error and status reporting after the execution of 
an SQL statement or directive in a COBOL program. For information about the SQL 
descriptor area (SQLDA), see Section 10, Dynamic SQL Operations. 
Using the INCLUDE STRUCTURES Directive 
The INCLUDE STRUCTURES directive specifies the version of SQL structures that the 
COBOL85 compiler generates. You must specify the INCLUDE STRUCTURES 
directive to generate version 300 or later SQL data structures. If you omit this directive, 
the COBOL85 compiler generates version 2 structures by default and includes this 
informational message in the compilation summary: 
INCLUDE STRUCTURES directive for SQL is missing. SQL 
VERSION 2 is assumed. This may produce incorrect SQL 
results in programs which use features introduced 
in SQL versions greater than VERSION 2. 
Code the INCLUDE STRUCTURES directive in the declarations area of the procedure 
before you code an INCLUDE SQLCA, INCLUDE SQLSA, or INCLUDE SQLDA 
directive. If the procedure is part of a compilation unit that consists of more than one 
procedure, place the INCLUDE STRUCTURES directive in the global declarations area 
or in the declarations area of the first procedure; the directive then applies to all 
procedures in the compilation unit. 
Use this syntax for the INCLUDE STRUCTURES directive: 
ALL VERSION
are keywords that specify the same version for all three SQL structures (SQLCA, 
SQLSA, and SQLDA). 
{ SQLCA | SQLSA | SQLDA } VERSION
are keywords that specify the SQLCA, SQLSA, or SQLDA structure, respectively. 
INCLUDE STRUCTURES { structure-spec } 
 structure-spec is: 
 { [ ALL ] VERSION version  }
 { { SQLCA | SQLSA | SQLDA } VERSION version }...
 { { SQLCA | SQLSA } [ EXTERNAL ] }










