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 in DCLGEN necessary?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Is DECLARE TABLE in DCLGEN necessary?
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    Post subject: Re: Is DECLARE TABLE in DCLGEN necessary?
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    Post subject: Re: Is DECLARE TABLE in DCLGEN necessary?
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    Post subject:
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    Post subject: Re: Is DECLARE TABLE in DCLGEN necessary?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 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


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