Problem:
Using Host Compatability Option with IBM DB2 database.
COBDB0109S error (undefined variable) for any SQL variable that is contained within a copy statement.
Resolution:
Go to the Project pull down menu and select "Build Settings for Project".
If this option states for a program within your project, highlite a folder in the left window of the Files tab and redo the first step.
Select the "COBOL" tab and then the "Preproc" tab.
Select the "Use additional preprocessor and Directives" and add P(CP) as the preprocessor below the checked area.
This is the copybook preprocessor which will expand copy statemants as well as SQL INCLUDE statements before starting the checking process for the SQL.
#MFDS
#EnterpriseDeveloper