36) What is DCLGEN ? -
DeCLarations GENerator: used to create the host language copy books for the
table definitions. Also creates the DECLARE table.
37) What are the contents of a DCLGEN? -
1. EXEC SQL DECLARE TABLE statement which gives the layout of the table/view
in terms of DB2 datatypes.
2. A host language copy book that gives the host variable definitions for the
column names.
38) Is it mandatory to use DCLGEN? If not, why would you use it at all? -
It is not mandatory to use DCLGEN.
Using DCLGEN, helps detect wrongly spelt column names etc. during the
pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool,
would generate accurate host variable definitions for the table reducing chances
of error.
39) Is DECLARE TABLE in DCLGEN necessary? Why it used?
It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by
the pre-compiler to validate the table-name, view-name, column name etc., during
pre-compile.
40) Will precompile of an DB2-COBOL program bomb, if DB2 is down?
No. Because the precompiler does not refer to the DB2 catalogue
tables.
|