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
 
Steps while compiling Cobol+DB2 pgm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
mfsiri

New User


Joined: 10 Jan 2006
Posts: 5

PostPosted: Tue Mar 21, 2006 5:52 pm    Post subject: Steps while compiling Cobol+DB2 pgm
Reply with quote

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
View user's profile Send private message

mfsiri

New User


Joined: 10 Jan 2006
Posts: 5

PostPosted: Wed Mar 22, 2006 9:39 am    Post subject:
Reply with quote

any one pls answer my below questions.
Back to top
View user's profile Send private message
philipraju
Warnings : 1

New User


Joined: 16 Apr 2006
Posts: 29

PostPosted: Sun Apr 16, 2006 1:02 pm    Post subject:
Reply with quote

hi,any one please give the answers to above question
Back to top
View user's profile Send private message
prakash271082

New User


Joined: 09 Sep 2005
Posts: 53

PostPosted: Tue Apr 18, 2006 10:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Tue Apr 18, 2006 11:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
Rampras

New User


Joined: 18 Apr 2006
Posts: 2

PostPosted: Tue Apr 18, 2006 1:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
abhicet2003

New User


Joined: 16 Nov 2005
Posts: 21

PostPosted: Sun Apr 23, 2006 12:42 pm    Post subject: Re: Steps while compiling Cobol+DB2 pgm
Reply with quote

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
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Fri May 12, 2006 2:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Fri May 12, 2006 3:06 pm    Post subject: Re: Steps while compiling Cobol+DB2 pgm
Reply with quote

Hi,

You may find this document helpful !

Thanks,
Parikshit
Back to top
View user's profile Send private message
nikitha

New User


Joined: 17 May 2006
Posts: 2

PostPosted: Wed May 17, 2006 12:10 pm    Post subject:
Reply with quote

hi
Back to top
View user's profile Send private message
humpty
Warnings : 1

New User


Joined: 01 May 2005
Posts: 23

PostPosted: Fri May 26, 2006 9:54 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

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