Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extracting DDL for all list of intere... Ashishpanpaliya DB2 5 Mon May 21, 2018 4:08 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us