we can code COPY DCLGEN or INCLUDE DCLGEN,
At which stage of the precompilation , dclgen get expanded
if we write 1) copy
2) include
one question about dclgen..
Is it mandatory to use declare table in dclgen..
I think no...but
it will be used by the precompiler to validate the table
name,column name etc..,
can one clear my doubt ..is it necessary to include
declare table or not?

Answers were Sorted based on User's Feedback



we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expa..

Answer / rama krishna reddy

During the precompilation time only copybooks mentioned
with INCLUDE are expanded all copy books mentioned with
COPY are expanded during compilation time
we have to specify all the dclgens and host variable
declartions using INCLUDE statement because those are
required during precompilation period.

Declare statement is not mandatory in the DCLGEN.it can be
used to validate the sql statements in the program i.e it
checks the table name and columns names and it gives the
corresponding warning messages.

Is This Answer Correct ?    13 Yes 1 No

we can code COPY DCLGEN or INCLUDE DCLGEN, At which stage of the precompilation , dclgen get expa..

Answer / prashanth

The copy books are expanded only in the compilation phase
of the application execution. But we would need the details
from DCLGEN in the pre-compilation phase, wherein the DB2
statements in the COBOL application is separated and put in
a DBRM. The equivalent COBOL ‘CALL’ statements are replaced
for the DB2 statements in the COBOL code. Then the
compilation of the COBOL and binding of the DBRM is done,
before being linked and executed.
Hence the INCLUDE statement is used instead of COPY
statement, an adaptation for the pre-compilation stage. The
same reason applies to the usage of INCLUDE in case of
SQLCA inclusion.

Is This Answer Correct ?    11 Yes 3 No

Post New Answer

More DB2 Interview Questions

What is copy pending status in db2?

0 Answers  


What are the two types of logging in the db2 database? Explain them.

0 Answers  


What is -904 sql code? How to resolve it?

3 Answers  


When reorg is used?

0 Answers  


What is the result of open cursor statement?

0 Answers  






How to create backup table in db2?

0 Answers  


Explain about open switch business continuity software?

0 Answers  


What information is contained in a SYSCOPY entry?

2 Answers  


How to resolve -407 sql code in DB2?

9 Answers   Cap Gemini,


Cursors can be declared in both working-storage & procedure division, Agreed. But is there any difference? If could you please suggest what is the difference. TIA

8 Answers   CGI, Wipro,


what is plan? is plan executable or package?

4 Answers  


what is utility for parm lib

0 Answers   IBM,


Categories