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
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 |
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 |
What is error -818 in db2. where can you find the timestamp of the DBRM and the source code.( precompile puts the timestamp on dbrm and source code correct?)
What do you mean by NOT NULL WITH DEFAULT? When will you use it?
Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.
How to rename a table in DB2 ?
What is the default page size of buffer pools?
What's the maximum number of characters that a tablename can have?
what is difference between random and sequence file access
a cursor normally gets closed once we provide a commit . If u try to close the same cursor with close cursor command later after providing the commit will there be any sql-error.
Explain in brief how does db2 determine what lock-size to use?
What is an inner join, and an outer join ?
What techniques are used to retrieve data from more than one table in a single SQL statement?
which is the most efficient tablespace?? a.simple tablespace. b.partitioned tablespace. c.segmented tablespace. d.none of the above. please post answer with the reason.?