Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is declare table necessary in DCLGEN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Is declare table necessary in DCLGEN
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: 147
Location: Columbia, MO

PostPosted: Sat Jul 28, 2007 12:08 am    Post subject: Re: Declare table in DCLGEN
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    Post subject: NO Declare table is Not necessary IN DCLGEN
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    Post subject:
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    Post subject:
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: 356
Location: New York

PostPosted: Fri Aug 03, 2007 3:21 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us