Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Program structure

An ESQL program consists of program text in the relevant programming language, also referred to as the host language, and SQL statements. SQL statements may be included wherever host language statements are permitted. The beginning and end of an SQL statement are marked so that they can be distinguished from the statements in the host language. The way in which the statements are marked depends on the programming language involved.

If host language variables (host variables) are used in the SQL statements, the program includes additional sections (DECLARE SECTION) in which these variables are defined. DECLARE SECTIONs may be included wherever variable definitions in the host language are allowed. The beginning and end of a DECLARE SECTION are marked by EXEC SQL BEGIN DECLARE SECTION and EXEC SQL END DECLARE SECTION respectively (the exact syntax is language-specific and is described in the “ ESQL-COBOL for SESAM/SQL-Server” manual. An ESQL program may include any number of DECLARE SECTIONs.

ESQL COBOL programs with executable examples of database statements can be
found in the demonstration database of SESAM/SQL (see the “ Core manual”).