15.10 - COBOL Coding Considerations - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

Embedded SQL statements must appear in the PROCEDURE DIVISION of the COBOL program. Exceptions are the DECLARE and INCLUDE statements, which can appear in WORKING STORAGE or the PROCEDURE DIVISION.

In Teradata mode, the INCLUDE SQLCA statement must appear only once, in the WORKING STORAGE SECTION.

When working in ANSI compatibility mode, declare a SQLCODE variable to receive codes. Declaring a SQLSTATE variable is also valid.