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

Is declare table necessary in DCLGEN


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

New User


Joined: 04 Jul 2007
Posts: 4
Location: chennai

PostPosted: Fri Jul 27, 2007 8:18 pm
Reply with quote

is declare table necessary in DCLGEN?
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Sat Jul 28, 2007 12:08 am
Reply with quote

As far as I know, if you want to use the data in a program, that's a big Yes!

Not sure about SPUFI, however.
Back to top
View user's profile Send private message
chandhanarao

New User


Joined: 04 Jul 2007
Posts: 4
Location: chennai

PostPosted: Sat Jul 28, 2007 11:42 pm
Reply with quote

But , as far as i found out..... Declare table is not necessary in DCLGEN, that is used by the precompiler to check if the column names are correct. So if we have perfect idea of the column names we can hard code it in the W-S Section. It is used in order to avoid errors
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Fri Aug 03, 2007 12:30 am
Reply with quote

No Need as DCLGEN is a copybook version on the table definition..

Thanks
Back to top
View user's profile Send private message
Bhagyalakshmi C

New User


Joined: 24 Jul 2007
Posts: 38
Location: Bangalore

PostPosted: Fri Aug 03, 2007 1:07 pm
Reply with quote

Hi,

I have a table i dont know any thing about the table.. i can jus see the records in the table using the comand select * from table name..
i need to write the table contents into a file.
how it can be done and in what way the DCLGEN can be used.
Help me!!!!!!!!

Thanks all!!!!!!!!
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Fri Aug 03, 2007 3:21 pm
Reply with quote

Hi,

DCLGEN is Declarations Generator which is used to create the host language copy books for the table definitions. From DCLGEN, you will come to know the coloumns of the table (with minor differences, Hyphens and Underscores).

Retreive all colomn values into host variables and move these fields into the file variables.

For eg:

Select col_1,col_2,col_3 (Table Fields)
into :col-1,:col-2,:col-3 (DCLGEN Fields)
from COLTAB

MOVE COL-1 of DCLGEN TO FIELD-NAME of FILE.
MOVE ............
MOVE .............


Please correct me if I am wrong.

Regards,
ksk
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top