Is DECLARE TABLE in DCLGEN necessary? Why it used?

Answers were Sorted based on User's Feedback



Is DECLARE TABLE in DCLGEN necessary? Why it used?..

Answer / obularaju

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

Is This Answer Correct ?    8 Yes 1 No

Is DECLARE TABLE in DCLGEN necessary? Why it used?..

Answer / abhishek singh

DECLARE TABLE, that is table structure of DCLGEN is NOT really needed for pre-compilation. But if it is used, then any misspelled table name, column names are trapped in pre-compilation stage itself.

Is This Answer Correct ?    0 Yes 0 No

Is DECLARE TABLE in DCLGEN necessary? Why it used?..

Answer / satty

yes, it is necessary to have declare table in dclgen.
without declaring the table we cant able to define the host
variable of what data type and length of data type.... the
not needed part is
dclgen table(xxxx)
library(yyyy)
action(add)
quote
this is not needed because the declare and host variable
definition can be hard coded into the pgm.

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More DB2 Interview Questions

I am getting a error multiple row fetched while executing a Cobol-DB2 program.How can I solve it without using a cursor.

8 Answers  


What is the difference between cursor and select statement?

0 Answers  


In which column of which DB2 catalog would you find the length of the rows for all tables?

2 Answers  


What is sqlcode -811?

7 Answers   Accenture, CTS, TCS,


Mention the various locks that are available in db2.

0 Answers  






How do I handle -911 (deadlock) error in a db2 program so that the program will never abend?

3 Answers   CTS, IBM,


What is iseries database?

0 Answers  


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

0 Answers  


can we drop column from a table

7 Answers   INDUS,


Why do we bind in db2?

0 Answers  


What is check constraint in db2?

0 Answers  


List down the types of triggers in the db2 database?

0 Answers  


Categories