IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What does we INCLUDE in DCLGEN


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
praneethgokul

New User


Joined: 06 May 2005
Posts: 20
Location: Bangalore

PostPosted: Thu Sep 01, 2005 7:23 pm
Reply with quote

Hi all,

What does we INCLUDE in DCLGEN ?

OR

What does DCLGEN contains?

Clarify me

Thanks in advance
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Thu Sep 01, 2005 8:21 pm
Reply with quote

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
View user's profile Send private message
Anbudan

New User


Joined: 07 Sep 2005
Posts: 26
Location: Germany

PostPosted: Wed Sep 07, 2005 4:51 pm
Reply with quote

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
View user's profile Send private message
mubashir.surury

New User


Joined: 29 Sep 2005
Posts: 23
Location: Pune

PostPosted: Fri Sep 30, 2005 7:41 pm
Reply with quote

hi all;

can i use COPY command instead of the INCLUDE statement,if not, then please justify.

icon_exclaim.gif
Back to top
View user's profile Send private message
ak1972

New User


Joined: 25 Aug 2005
Posts: 7

PostPosted: Sat Oct 01, 2005 4:36 am
Reply with quote

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
View user's profile Send private message
mubashir.surury

New User


Joined: 29 Sep 2005
Posts: 23
Location: Pune

PostPosted: Mon Oct 03, 2005 1:21 pm
Reply with quote

thanks for clearing my doubt.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
No new posts include cond ascii constant DFSORT/ICETOOL 4
Search our Forums:

Back to Top