Page 1 of 1

Should the programs be recompiled?

Posted: Wed Oct 11, 2017 3:30 pm
by Kapil Sharma
Hi,

I have a structure in a COBOL copybook like this:

Code: Select all

05 TB-ABCD-ENTRY.                                            
   10 TB-ABCD-COMPANY-CODE           PIC X(02)  VALUE SPACES.
   10 TB-ABCD-ONLINE-FRT-CONS-SW     PIC X(01)  VALUE ' '.   
      88 TB-ABCD-ONLINE-FRT-CONS                VALUE 'Y'.   
   10 FILLER                         PIC X(197).             
From the FILLER we are picking up 4 character for a new value like this:

Code: Select all

05 TB-ABCD-ENTRY.                                            
   10 TB-ABCD-COMPANY-CODE           PIC X(02)  VALUE SPACES.
   10 TB-ABCD-ONLINE-FRT-CONS-SW     PIC X(01)  VALUE ' '.   
      88 TB-ABCD-ONLINE-FRT-CONS                VALUE 'Y'.   
   10 WS-NEW-VAR                     PIC X(04).             
   10 FILLER                         PIC X(193).             
Should we recompile all the programs which are using this file. I believe we don't need to recompile as the length is not changed.

Re: Should the programs be recompiled?

Posted: Wed Oct 11, 2017 5:19 pm
by Robert Sample
While programs using the copy book do not require compilation, it is wise to always recompile every program whenever variables are added to the copy book (even if the length does not change) since there could be variables in the programs with the same name.

Re: Should the programs be recompiled?

Posted: Wed Oct 11, 2017 10:28 pm
by Anuj Dhawan
Robert Sample wrote: Wed Oct 11, 2017 5:19 pmWhile programs using the copy book do not require compilation, it is wise to always recompile every program whenever variables are added to the copy book (even if the length does not change) since there could be variables in the programs with the same name.
I always thought that there is just no need to compile the programs and it did worked over the years. Thinking about your statement, Robert, it looks like I had been lucky, most of the times! :)

Re: Should the programs be recompiled?

Posted: Wed Oct 11, 2017 11:42 pm
by Robert Sample
Not necessarily lucky -- it would be rare indeed for a program variable to have the same name as a copy book variable since there are usually naming standards. But I did see it happen once early in my career and since then I've always erred on the side of caution.

Re: Should the programs be recompiled?

Posted: Thu Oct 12, 2017 9:09 am
by Anuj Dhawan
That make sense. Thanks - will keep that in mind.

[ Post made via Android ] Image

Re: Should the programs be recompiled?

Posted: Thu Oct 12, 2017 9:49 am
by enrico-sorichetti
recompilation depends also on the setup of Your source control system ...
a change in a copybook might force a rebuild of all the sources including it

the sequence of command used might change depending on the source control system used

Re: Should the programs be recompiled?

Posted: Sun Dec 03, 2017 7:27 pm
by Kapil Sharma
Thanks all.

Hi Enrico,

What are you calling source control system? Version control tool? We are not using any version control tool and it is all manual.

Re: Should the programs be recompiled?

Posted: Mon Dec 04, 2017 4:57 pm
by nicc
You mean you do not use Endevor or ChangeMan or Panvalet or SCLM or..?

Re: Should the programs be recompiled?

Posted: Tue Dec 05, 2017 4:25 pm
by Kapil Sharma
Yes, we do not.

The mainframe system were not upgraded since last 12-13 years, as we were supposed to move to another technology but they could not so tools were not updated.