Is DECLARE TABLE in DCLGEN necessary? Why it used?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
how to copy the host variables from ps file into cobol program other than include statement
I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?
What is auditing?
What is the physical storage length of date data type?
This was related to -811 sqlcode, In a COBOL DB2 program which accesses employee table and selects rows for employee 'A', it should perform a paragraph s001-x if employee 'A' is present. In this case it gets -811 sqlcode, but still it process the paragraph s001-x. What could be wrong in my code.
What are simple, segmented and partitioned table spaces ?
max number of columns in a db2 table?
My DB2 program first read the data from a file and then it look into a table with the data it got from the file.If we did not bind the program , should the file read before SQL execution be success??
How many buffer pools are available in db2?
wht are the restrictions for union ?
What are the two types of logging in the db2 database? Explain them.
How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?