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
 

 

Query: Regarding need of recompilation.

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

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Wed Feb 13, 2008 5:22 pm    Post subject: Query: Regarding need of recompilation.
Reply with quote

I have a copybook which is used by several modules(COBOL progs), if we add some fields to copybook which are used by some modules(not all), is it essential to recompile all the modules which uses that copybook, irrespective of whether that module refer newly added field or not. Please suggest.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Feb 13, 2008 5:27 pm    Post subject: Reply to: Query: Regarding need of recompilation.
Reply with quote

it depends on Your shop standards

did Your file layout change ( only added fileds at the end )
do You have any clashes in Your FD section ( only added fileds at the end )
( but since I am not a cobol expert I am just suggesting some meditation points )

do the standards dictate that the load must always be in sync with the source
I would enforce it also for auditing purposes
Back to top
View user's profile Send private message
Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Wed Feb 13, 2008 5:31 pm    Post subject:
Reply with quote

Hi VinayCM,

It also depends on where the new fields are to be added in the copybook. If the new fields are to be added in the middle of the copybook, then all the programs need to be recompiled. If they are to be added at the end in place of an existing filler, then we need not recompile, though it is always recommended to recompile.
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Wed Feb 13, 2008 6:29 pm    Post subject:
Reply with quote

Thanks for your suggestions, I'm adding fields in middle also, is there any way to avoid recompilation of all modules, so that i can recompile the modules which uses that newly added fields..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Feb 13, 2008 6:33 pm    Post subject: Reply to: Query: Regarding need of recompilation.
Reply with quote

if the copybook is a working storage only,
You might get away with it

BUT if the copybook is a file record layout then..

Your organization should have a plan for cutover from the old layout to the new layout,
and yes, in this case all the programs must be recompiled

( what about writing with the old/new layout and reading with the new/old one ??? )
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Feb 13, 2008 6:59 pm    Post subject: Reply to: Query: Regarding need of recompilation.
Reply with quote

... while typing I forget things...

Usually this decision is an overall application development strategy
so there should not be the need to ask Yourself the question,
just look at Your shop standards and practices documents
and the answer will/should be there

( if the answer is not there, some chapters might be missing,
but then also some ISO certification might be missing icon_lol.gif )
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Feb 13, 2008 7:12 pm    Post subject:
Reply with quote

VinayCM wrote:
I'm adding fields in middle also, is there any way to avoid recompilation of all modules, so that i can recompile the modules which uses that newly added fields..
Absolutely YES....... Even if adding to the end (to prevent storage overlay)......
The only condition that you would not need to recompile everything is if existing filler was changed to named fields....
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Wed Feb 13, 2008 7:14 pm    Post subject:
Reply with quote

To clarify previous posts:

If you are adding fields "in the middle," but they are occupying previous FILLER, and therefore not shifting other fields or changing the record length, then there is no technical need for recompiling.

Some may recommend recompiling all programs on general principles, but some shops require testing all recompiled programs - are you prepared to do that if that is your shop's standard?

I am not in favor of recompiling every program unless there is a shift or LRECL change, but then I must know that I cannot look at any compile listing to see what's in a copybook - I must look at the copybook itself.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Feb 13, 2008 7:28 pm    Post subject: Reply to: Query: Regarding need of recompilation.
Reply with quote

Ok lets keep it on the philosophic side
it also depends On the what software control program somebody is using

let' s take SCLM for example

the two main actions are BUILD and PROMOTE
and the philosophy applies to every object type, with some side effects

for a program a build will result in two main steps

sclm related
parsing to find out the dependencies ( on copybooks and external subroutines )
object related
precompilation, compilation, linkage, editor bind ( as a general sample )

no side effects for a program

for a copy book BUILD
there will be ( to keep it short ) only the side effects
which are a rebuild of the sources where the copy book is used

for a static subroutine BUILD
there will be the usual build of the subroutine
and the side effect of relinking all the load where the subroutine is being used ( and if the environment has been propery setup, also the bind )

so no need to ask oneself if there is the need to recompile everything
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Feb 14, 2008 4:39 pm    Post subject:
Reply with quote

CICS Guy wrote:
Absolutely YES....... Even if adding to the end (to prevent storage overlay)......
The only condition that you would not need to recompile everything is if existing filler was changed to named fields....
With my little experience wit Mainframes I stand with CICS Guy here.
Back to top
View user's profile Send private message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Tue Feb 19, 2008 12:27 pm    Post subject: Seen a similar problem...
Reply with quote

Hi,

I had seen a similar problem in my previous project and we did not recompile the whole lot of pgms using the copybook.

If the old copybook was called COPY...we made a new copybook called COPY1 (with new fields replacing the fillers).

Now whichever pgm required the change we used COPY1 and rest of the lot remained with old copybook i.e. COPY (Why would u like to change a copybook which has no relevance to ur running code...let it remain as it was).

I am not sure whether u could do the same or not, else i suggest pls recompile the whole lot to be on the safer side.

Regards,
Shitij
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 19, 2008 1:39 pm    Post subject: Re: Seen a similar problem...
Reply with quote

shitij wrote:
If the old copybook was called COPY...we made a new copybook called COPY1 (with new fields replacing the fillers).
Hi,

It's same like introducing a totally new COPYBOOK(COPY1 here), which actually doesn't exist in the system already, if the copybook doesn't exist than how can it impact other programs..obviously no need of recompilation of programs which use the same contents as of previous copybook (COPY). But then how many times You are gonna do the same things, soon there will be a list of copybooks with small differences among them...
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
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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