Using SQL INCLUDE with the DB2 coprocessor

An SQL INCLUDE statement is treated identically to a native COBOL COPY statement (including the search path and the file suffixes used) when you use the SQL compiler option.

The following two lines are therefore treated the same way. (The period that ends the EXEC SQL INCLUDE statement is required.)

EXEC SQL INCLUDE name END-EXEC.
COPY name.

The name in an SQL INCLUDE statement follows the same rules as those for COPY text-name and is processed identically to a COPY text-name statement that does not have a REPLACING phrase.

COBOL does not use the DB2 environment variable DB2INCLUDE for SQL INCLUDE processing. If you use the DB2INCLUDE environment variable for SQL INCLUDE processing, you can concatenate it with the setting of the COBOL SYSLIB environment variable in the .profile file in your home directory or at the prompt in an AIX command shell. For example:

export SYSLIB=$DB2INCLUDE:$SYSLIB

related references  
Compiler-directing statements
  
COPY statement (COBOL for AIX Language Reference)