COBOL Coding Considerations - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

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.