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

Is DECLARE TABLE in DCLGEN necessary?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zishankamal

New User


Joined: 07 Apr 2006
Posts: 7

PostPosted: Thu Oct 19, 2006 1:36 pm
Reply with quote

Is DECLARE TABLE in DCLGEN necessary?

As far as I know, 'DECLARE TABLE' in DCLGEN is used by the pre-compiler to validate the table name, view name, column name etc., during precompilation. if Declare table is not specified, then how table name, view name etc will be validated in the precompilation?
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 19, 2006 1:48 pm
Reply with quote

Hi Zishan Kamal,

If DCLGEN Table declaration is not mentioned then table name will be validated while bind. Column name will be validated while run time
Back to top
View user's profile Send private message
zishankamal

New User


Joined: 07 Apr 2006
Posts: 7

PostPosted: Thu Oct 19, 2006 3:10 pm
Reply with quote

Thanks Surya. But i am still confused.

You said, "If DCLGEN Table declaration is not mentioned then table name will be validated while bind."

But if Table declaration is not there at the time of precompilation, then how the DBRM will be created. And if DBRM is not created, then how can we BIND...
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu Oct 19, 2006 3:28 pm
Reply with quote

zishankamal,

It's not mandatory that you've DCLGEN Table structure in the program, but if you have, the Pre-complier validates the field name, etc and throws you a warning at precompile stage.

DBRM is not created from DCLGEN, rather they're created from the SQL statements that you would have used in the program.

At the BIND stage, the SQL statements taken from the DBRM are validated and an error is thrown if an issue's found.

In brief, DCLGEN is an added feature that you may or may not use in the program.

Does this make sense?

Cheers, Twissi.
Back to top
View user's profile Send private message
zishankamal

New User


Joined: 07 Apr 2006
Posts: 7

PostPosted: Thu Oct 19, 2006 3:56 pm
Reply with quote

Yeah, it makes lots of sense. Thank You Twissi.
Back to top
View user's profile Send private message
ashish singh

New User


Joined: 01 Dec 2006
Posts: 1
Location: delhi

PostPosted: Thu Dec 14, 2006 6:05 pm
Reply with quote

kamal i m agree with u
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 -> Mainframe Interview Questions

 


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