Do I need to recompile all the COBOL programs?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Shreya Khatri
New Member
Posts: 5
Joined: Sun Jun 15, 2014 12:48 am

Do I need to recompile all the COBOL programs?

Post by Shreya Khatri »

Hi,

A copybook is used in several COBOL programs. If we add some fields to copybook which are used by some modules but not all the programs, is it necessary to recompile all the modules which are using this copybook even though the program does not use newly added field? Please suggest.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Do I need to recompile all the COBOL programs?

Post by enrico-sorichetti »

in general it is a good practice to have everything aligned!
usually a change management tool will, on its own, rebuild the modules referring to a changed copybook
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Shreya Khatri
New Member
Posts: 5
Joined: Sun Jun 15, 2014 12:48 am

Re: Do I need to recompile all the COBOL programs?

Post by Shreya Khatri »

Thaks enrico!
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1889
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Do I need to recompile all the COBOL programs?

Post by Robert Sample »

If the added fields change the length of the record, then you need to recompile every program using the copy book. Otherwise, you may not need to recompile every program -- it depends largely upon whether the added fields are all at the end of the record or not.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”