View previous topic :: View next topic |
Author |
Message |
ksandy Beginner
Joined: 27 Mar 2003 Posts: 18 Topics: 11
|
Posted: Thu Jan 08, 2004 6:31 am Post subject: Binding subprograms and main programs |
|
|
Hi
Can anybody explain about BIND process when it comes to a Db2 program calling another DB2 programs
1. Does it make any difference if main program & subprogram ..DBRMs are associated with same or different collection id
2. If we incorporate changes in only main program/sub-program , what should be flow for bind process
3. if we have to change a subprogram called by 3-4 different main program then what can be optimised bind process in that case
Thanks
Ksandy |
|
Back to top |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Thu Jan 08, 2004 6:37 am Post subject: |
|
|
The bind process comes in two flavours: PLAN oriented, which stands for a complete transaction, and PACKAGE oriented, which stands for one module (compile unit). Advisable is the usage of packages; with this, (3.) is obsolete.
To (1.): It makes no difference, as long as all used collection ids are listed in the DB2 plan executed at runtime.
To (2.): I didn' get your question.
regards
Christian |
|
Back to top |
|
 |
ksandy Beginner
Joined: 27 Mar 2003 Posts: 18 Topics: 11
|
Posted: Tue Jan 13, 2004 1:07 am Post subject: |
|
|
Thanks Christin
2. Suppose , I have main pgm M1 calling 2 subprograms s1, s2 .
Now if s1 changes , do I have to compile - bind M1 again or just bind will suffice.
in reverse scenario if main program M1 changes... M1 should be compiled & Bind , but do we have to bind s1 & s2 also .
Can someone explain in detail about this both in PLAN and Collection-id scenario
Ksandy |
|
Back to top |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Tue Jan 13, 2004 9:44 am Post subject: |
|
|
If your Bind statement is "BIND PACKAGE ...", you are working module oriented. In that case no binding of unchanged modules is needed.
If your Bind statement is "BIND PLAN ... MEMBER ... ", you statically bind all DBRMs belonging to a transaction into one PLAN, comparable to a statically linked bunch of load modules. In that case you have to issue the bind statement if any of the listed DBRMs has changed.
Regards
Christian |
|
Back to top |
|
 |
|
|