View previous topic :: View next topic
|
Author |
Message |
mfsiri
New User
Joined: 10 Jan 2006 Posts: 5
|
|
|
|
Hi,
1) I would like to know steps whils compiling Cobol + DB2 pgm.
2) How many packages & plans require if a pgm calling 1 pgm ?
3) How many packages & plans require if a pgm calling more than 1 pgm ?
Advance thanks |
|
Back to top |
|
|
mfsiri
New User
Joined: 10 Jan 2006 Posts: 5
|
|
|
|
any one pls answer my below questions. |
|
Back to top |
|
|
philipraju Warnings : 1 New User
Joined: 16 Apr 2006 Posts: 29
|
|
|
|
hi,any one please give the answers to above question |
|
Back to top |
|
|
prakash271082
New User
Joined: 09 Sep 2005 Posts: 53
|
|
|
|
Hi,
The Compiling Steps for a Cobol - DB2 program is,
1. Precompile - DBRM and Modified Source program.
2. Compile, Linkedit.
3. Bind & Run.
For your questions 2 and 3, I hope only one plan is enough. |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
Hi Siri,
The best way to explain your doubts is through ENDEVOR (CA-ENDEVOR, a third party software).
Compile your program as a COB3D type (COBOL+DB2) and successful compilation produces the LOAD & DBRM. Use DBRM for binding and LOAD to execute the program.
If you have connected programs (one calling the other), you'll need as many number of packages as the number of programs. Here, this includes the calling as well as the called program. And only one PLAN.
For example, if your main program calls two other programs, you will need 3 PACKAGEs and 1 PLAN.
Hope this's clear.
Cheers, Twissi. |
|
Back to top |
|
|
Rampras
New User
Joined: 18 Apr 2006 Posts: 2
|
|
|
|
Hello,
A few more additions...
1. When you use version control tool like Endevor, you'll have to create a bind card in the Global packlib PDS (installation specific...you can ask your DBA) before you can add the new COBOL DB2 program.
2. You'll require a package for your called module only if your called module has SQL statements in it. |
|
Back to top |
|
|
abhicet2003
New User
Joined: 16 Nov 2005 Posts: 21
|
|
|
|
If i want to use only packages and no plans for reducing bind costs.Is it possible to omit bind process?
Because here most of replies mentioned that using packages alone reduces binding cost.Is it possible to execute program with out binding.
Thanks |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
Hi abhicet2003,
I don't think you can execute a program using a PACKAGE because it will not have the access path defined!
To execute a COBOL DB2 program, you'll have to use a PLAN for sure.
Please tell us more about the program and how is it compiled, any other relevant information, so on and so forth.
Cheers, Twissi. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
You may find this document helpful !
Thanks,
Parikshit |
|
Back to top |
|
|
nikitha
New User
Joined: 17 May 2006 Posts: 2
|
|
|
|
hi |
|
Back to top |
|
|
humpty Warnings : 1 New User
Joined: 01 May 2005 Posts: 23
|
|
|
|
hi mfsiri,
the cobol+db2 program goes in this manner.
we have a source module (cobol program).
the first step is precompile.
during precompilation three steps are perfomed.
1). All the SQL statements in the program are extracted in DBRM.
2). All the SQL statements embedded within delimiters calls the DB2
runtime modules and are replaced by applicable parameters.
3). A consistency token(timestamp) is generated for both the DBRM and the modified source obtained after replacing all the SQL statements from the source module, to make sure that both are interrelated.
Now the flow of is divided into two coz we are left with the MODIFIED SOURCE and the DBRM.
From this step the modified source ic compiled to get the object module and link edited to get the load module.
on the other hand, the DBRM is BIND into PLAN or PACKAGE. BIND is just like the compiler for the SQL statements.
PLAN contains the logic used by the OPTIMIZER. The input to a plan is
a). One DBRM or more than one DBRM or
b). One PACKAGE or more than one PACKAGE or
c). Combination of both DBRM and PACKAGE.
The output of a PLAN is executable application which runs in conjunction with the load module obtained.
whereas, the input to PACKAGE is only one DBRM and the output is not executable. The PACKAGE has to be ultimately BIND into PLAN.
Now to the number of PACKAGEs and PLAN is concerned when a one pgm or more than one pgm is called. so it depends on you. you can bind as many as packages as you want but all the packages has to be ultimately changed into PLAN.
one benefit of the PACKAGE is that if you make changes in the program you only need to rebind the package and not the whole PLAN.
i think that answers your question.
thanks. |
|
Back to top |
|
|
|