How will the COBOL-DB2 program behave if the DCLGEN member is not included?


The DCLGEN member contains two important sets of data.

  1. The table structure containing definitions of all the columns present in the table.

  2. The host variable declaration in equivalent COBOL data types.

Including the DCLGEN member is not mandatory until we explicitly give the host variables declaration in the working storage section. But it is always considered as a good coding practice to include a DCLGEN member because it also contains the table structure using which the pre-compiler can perform the query column validation. Although, the query column validation is optional for the pre-compiler but it gives us possible errors in the precompilation stage only, saving our time.

Updated on: 14-Sep-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements