The BEGIN DECLARE SECTION statement can be included anywhere where COBOL permits variable declaration. Use END DECLARE SECTION
to identify the end of a COBOL declaration section.
Declare sections cannot be nested.
Variables must be declared in COBOL, not in SQL.
To avoid conflict, variables inside a declaration section cannot be the same as any outside the declaration section or in
any other declaration section, even in other compilation units.
If data structures are defined within a declaration section, only the bottom-level items (with PIC clauses) can be used as
host variables. Two exceptions are arrays specified in FETCH statements and record structures specified in SELECT INTO statements.
Comments:
The BEGIN DECLARE SECTION statement can be included anywhere where COBOL permits variable declaration. Use END DECLARE SECTION to identify the end of a COBOL declaration section.
If data structures are defined within a declaration section, only the bottom-level items (with PIC clauses) can be used as host variables. Two exceptions are arrays specified in FETCH statements and record structures specified in SELECT INTO statements.