View previous topic :: View next topic
|
Author |
Message |
praneethgokul
New User
Joined: 06 May 2005 Posts: 20 Location: Bangalore
|
|
|
|
Hi all,
What does we INCLUDE in DCLGEN ?
OR
What does DCLGEN contains?
Clarify me
Thanks in advance |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
When you use DCLGEN to generate a table's declaration, DB2 gets the relevant information from the DB2 catalog, which contains
information about the table's definition and the definition of each column within the table.
DCLGEN generates a table declaration and puts it into a member of a partitioned data set that you can include in your program.
DCLGEN, the declarations generator supplied with DB2, produces a DECLARE statement you can use in a C, COBOL, or PL/I program, so that you do not need to code the statement yourself.
When you use DCLGEN to generate a table's declaration, DB2 gets the relevant information from the DB2 catalog, which contains
information about the table's definition and the definition of each column within the table.
DCLGEN uses this information to produce a complete SQL DECLARE statement for the table or view and a matching PL/I, or C structure declaration or COBOL record description. You can use DCLGEN for table declarations only if the table you are declaring already exists.
hope this helps.
pls refer manual for more informations. |
|
Back to top |
|
|
Anbudan
New User
Joined: 07 Sep 2005 Posts: 26 Location: Germany
|
|
|
|
Hi Praneeth,
Practically,
If you go to DCLGEN screen, it ask the table name. If u give the table name and other table info, it create the dclgen. This dclgen was put in PDS(the pds name, u have to give, while fill the DCL screen)
The pds contains teh column & row details of the table and the cobol variables for the 'table-column'
U just copy this pds into ur cobol programm.
Need mor e info - don't hesitate to contact
Anbudan |
|
Back to top |
|
|
mubashir.surury
New User
Joined: 29 Sep 2005 Posts: 23 Location: Pune
|
|
|
|
hi all;
can i use COPY command instead of the INCLUDE statement,if not, then please justify.
|
|
Back to top |
|
|
ak1972
New User
Joined: 25 Aug 2005 Posts: 7
|
|
|
|
INCLUDE is needed for the DB2 Pre-Compiler.
Remember that the DB2 Pre-Compiler executes *before* the Cobol Compiler.
So if you have variables in a copybook member, the Cobol COPY Command will have no effect; the DB2 Pre-Compiler will not recognize those variables and your compilation will fail. |
|
Back to top |
|
|
mubashir.surury
New User
Joined: 29 Sep 2005 Posts: 23 Location: Pune
|
|
|
|
thanks for clearing my doubt. |
|
Back to top |
|
|
|