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
 

 

Some queries related to bind -

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Fri Jul 30, 2010 1:09 pm    Post subject: Some queries related to bind -
Reply with quote

Hi,


I have following question -

1. When we bind(or create) the plan, does DB2 provides various access path or one access path which is the best, and during execution optimiser selects the best path, second part of question - Does Optimizer comes into picture during Bind
2. If it provides various access path, then Explain=Yes parameter in Bind, will it generate the explain for all the access path(I can't check it now, as I don't have a plan table with my HLQ neither do i have access to create one)
3. Does access path changes with the data provided in the where clause, as in Suppose I have a predicate to choose Student ID > '0001' and Student ID <= '10000'. Now if i change the value in the next query from 20000 to 50000, will the access path remain same.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 30, 2010 1:29 pm    Post subject:
Reply with quote

after you have read the info linked to by this post
Plans+DBRMS+Packages+Collections+Versions = Confusion
come back with any questions that you have.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Sat Jul 31, 2010 12:22 am    Post subject: Reply to: Some queries related to bind -
Reply with quote

@dbzTHEdinosauer --> Thanks for the link, it was really informative.

But I have some questions -

1. The article says - Companies rarely had COBOL license on production machine. If so, how cobol program used to run in production.
2. Bind included check for authorization and SQL syntax. When, IBM came up with concept of package, they moved all the authorization chk and SQL syntax check to package creation step, AM I right & the only work of bind step was to generate the executable and nothing else.
3. The paragraph detailing the Collection seems to be confusion. The question is, if in a program there are two tables being refernced, but both have same name, but the HLQ is different. Even Collection will not help. In the program itself, coder will have to give HLQ in query, but the paragraph seems to say, collection will solve this problem.

Besides, one of the problem with binding a DBRM to plan was, if a program is changed, it has to be bounded again, which will result in binding of other program which was not required.

To solve this, they come up with Package concept, but even in this case, the bind has to be done again, even though only one program has changed. Reason is, Latest version of package needs to be bounded.

The problem could have been solved, if the binding was dynamic, also package step would have created executable and not an non executable.

The bind step would have just stored the information and address of package, and when a SQL was referenced in program, Bind would have given the name and address of the package. So by this, even though the Package has changed, Bind was not required.

Any reason why this was not followed rather they went on creating the concept of collection ID.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Jul 31, 2010 12:52 am    Post subject:
Reply with quote

1. license is for the compiler.

2. no.

3. the use of collections, even different plans or different packages
removed the necessity of coding the hlq in the sql.
I have never used a hlq for a table in a program, only in spufi.
part of the bind process is to associate the program/plan to a hlq - look at bind parms.

binding dynamically is not economical.
statically bound programs execute with significantly less resources that dynamic sql programs.

bind is always required before the sql can be invoked.
either static or dynamically.

suggest that you read Introduction to DB2 for z/OS
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 SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts What's plan, package, bind ? jackzhang75 DB2 2 Sun Feb 28, 2016 7:29 pm
No new posts JCL sort related Mani453 DFSORT/ICETOOL 13 Sun Dec 20, 2015 1:04 pm
No new posts Query related to inserting an auto po... Gopalakrishnan V DB2 4 Fri Dec 18, 2015 12:09 am
No new posts What is Bind Error? Chetan Kumar Mainframe Interview Questions 1 Fri Oct 16, 2015 7:00 pm


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