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

Is DECLARE TABLE in DCLGEN necessary? Why it used?


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

New User


Joined: 12 Jun 2008
Posts: 26
Location: chennai

PostPosted: Mon Aug 03, 2009 12:11 pm
Reply with quote

it is mentioned in the soultions as

"It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the pre-compiler to validate the table-name, view-name, column name etc., during pre-compile"

My question is
if we remove declare table statement in the dclgen and remain only host variables then how does the precompiler validate the table-name,view name...etc....

Thanks
ajay
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Mon Aug 03, 2009 2:01 pm
Reply with quote

Precompile is a verification step before the DBRM goes for BIND.
It doesn't validate if you remove the declare table statement.
Back to top
View user's profile Send private message
chennai

New User


Joined: 12 Jun 2008
Posts: 26
Location: chennai

PostPosted: Mon Aug 03, 2009 2:09 pm
Reply with quote

"so you mean to say if the declare is used it will validate at the time of precompilation else if we remove it will not validate...at the same time it is not mandatory to specify that...." hope my understanding is correct
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Mon Aug 03, 2009 4:22 pm
Reply with quote

Thats correct.
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