Application Development Guide


Embedding SQL Statements in COBOL

Embedded SQL statements consist of the following three elements:

Element
Correct COBOL Syntax

Keyword pair
EXEC SQL

Statement string
Any valid SQL statement

Statement terminator
END-EXEC.

For example:

     EXEC SQL SELECT col INTO :hostvar FROM table END-EXEC.

The following rules apply to embedded SQL statements:


[ Top of Page | Previous Page | Next Page ]