IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Query: Regarding need of recompilation.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Feb 13, 2008 5:27 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Feb 13, 2008 6:33 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Feb 13, 2008 6:59 pm
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: 2146
Location: At my coffee table

PostPosted: Wed Feb 13, 2008 7:12 pm
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

Senior Member


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

PostPosted: Wed Feb 13, 2008 7:14 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Feb 13, 2008 7:28 pm
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

Superior Member


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

PostPosted: Thu Feb 14, 2008 4:39 pm
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
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

Superior Member


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

PostPosted: Tue Feb 19, 2008 1:39 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top