Variables used in SQL commands in the PROCEDURE DIVISION are
known as host variables. All host variables used in a
program must be declared in the FILE SECTION, the WORKING-STORAGE
SECTION, or the LINKAGE SECTION of the DATA DIVISION. The declarations
must appear between the two following SQL commands:
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
.
. Host variables are declared here
. in COBOL data declarations.
EXEC SQL END DECLARE SECTION END-EXEC.
|
For detailed information regarding host variables,
see the chapter, "Host Variables."