What will be the result if DCLGEN is given with COPY statement and not INCLUDE?

DB2DatabaseBig Data Analytics

The main difference between INCLUDE and COPY statement is the PDS member with INCLUDE statement is expanded during pre-compilation while the PDS member with COPY statement is expanded during compilation.

Since the DCLGEN member contains column names of the table (table structure) it is necessary to expand it during the pre-compilation. This is because at the time of precompilation all the SQL statements are validated, placed in DBRM and finally replaced by appropriate COBOL calls.

If the DCLGEN members are given with COPY statement instead of INCLUDE statement, then it will result in DB2 warnings during pre-compilation as the pre-compiler would not be able to validate the SQL statements in COBOL-DB2 program.

raja
Published on 14-Sep-2020 14:31:05
Advertisements