View previous topic :: View next topic
|
Author |
Message |
VinayCM
New User
Joined: 06 Nov 2007 Posts: 36 Location: Bengaluru
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Jerry
New User
Joined: 16 Sep 2005 Posts: 42
|
|
|
|
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 |
|
|
VinayCM
New User
Joined: 06 Nov 2007 Posts: 36 Location: Bengaluru
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
... 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 ) |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
shitij
New User
Joined: 09 Sep 2005 Posts: 31 Location: Delhi
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
|