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
 

 

Differenct b/w PLAN and PACKAGES

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

New User


Joined: 19 Feb 2005
Posts: 28

PostPosted: Thu Mar 10, 2005 7:24 pm    Post subject: Differenct b/w PLAN and PACKAGES
Reply with quote

HI,
I want to know what is the exact difference between plan & package
I know that package is non executable.
In which cases bind package is advantages .

PLEASE CLARIFY THIS DOUBT
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Thu Mar 10, 2005 10:03 pm    Post subject:
Reply with quote

Quote:
what is the exact difference between plan & package


A plan can have any no of DBRMs while a Package is always bound from a single DBRM.

Quote:
I know that package is non executable.


Yes, You are right. You must create a Plan which contains the Package. (A Plan can also hold packages).

Quote:
In which cases bind package is advantages


It's recommended to create packages, when you have to modify the SQL statements in your applications or database tables that are accessed by your programs. So it's enough to REBIND the corresponding package, instead of the entire PLAN.

Advantages of Packages over Plan:
Code:

1. When you use packages, you do not need to bind the entire plan again when you change one SQL statement. You need to bind only the package associated with the changed SQL statement.
 
2. Binding packages into package collections allows you to add packages to an existing application plan without having to bind the entire plan
again. A collection is a group of associated packages. If you include a collection name in the package list when you bind a plan, any package in the collection becomes available to the plan. The collection can even be empty when you first bind the plan. Later, you can add packages to the collection, and drop or replace existing packages, without binding the plan again.
 
3. Maintaining several versions of a plan without using packages requires a separate plan for each version, and therefore separate plan names and RUN commands. Isolating separate versions of a program into packages requires only one plan and helps to simplify program migration and fallback. For example, you can maintain separate development, test, and
production levels of a program by binding each level of the program as a separate version of a package, all within a single plan.
 
4. The options of BIND PLAN apply to all DBRMs bound directly to the plan. The options of BIND PACKAGE apply only to the single DBRM bound to that package. The package options need not all be the same as the plan options, and they need not be the same as the options for other packages used by the same plan.
 
5. You can use a bind option to name a qualifier for the unqualified object names in SQL statements in a plan or package. By using packages, you can use different qualifiers for SQL statements in different parts of your application. By rebinding, you can redirect your SQL statements, for example, from a test table to a production table.
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 Program and its corresponding plan vickey_dw DB2 4 Thu Apr 07, 2016 9:27 pm
No new posts Should we Rebind Plan if no SQL changes sappy_mf DB2 2 Thu Mar 03, 2016 2:13 pm
No new posts What's plan, package, bind ? jackzhang75 DB2 2 Sun Feb 28, 2016 7:29 pm
No new posts DB2 plan for DSNTEP2 / DSNTEP4 Mainak_Dalal DB2 3 Thu Jan 21, 2016 1:08 am
No new posts Multiple COBOL-DB2 pragrams calling b... deepak_shrivastava DB2 1 Wed Jan 06, 2016 3:45 pm


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