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
 

 

Recompiling Copybook after add a new field

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

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Mon Nov 20, 2006 5:44 pm    Post subject: Recompiling Copybook after add a new field
Reply with quote

Hii

I have a copybook which is used over several programs.I want to add a new field to the copybook which is not referenced in some of the abovesaid programs.Do i need to recompile all the programs?

Thanks
Archana
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Nov 20, 2006 6:02 pm    Post subject:
Reply with quote

Only if the addition of the filed changes the relitive displacement of other fields that are referenced. Or if the copybook defines a record whose length has changed.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Nov 20, 2006 6:05 pm    Post subject:
Reply with quote

Hi Archana,

If the adding the new field in the copybook at end & the programs are not going to use this then there is no need to recompile those program.
Back to top
View user's profile Send private message
sihanature
Warnings : 1

New User


Joined: 01 Sep 2005
Posts: 33

PostPosted: Mon Nov 20, 2006 6:14 pm    Post subject:
Reply with quote

Hi

Yes we need to recompile this copybook when the program is going to have impact due to this.

Regards
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 6:24 pm    Post subject:
Reply with quote

Hi..,

If the new field is added to the copy book and if the program not copiled then it will take the old load module only, even though if you add in the middle or at the end it wont consider, if you compile the program then only it will get effective, if you recompiled the program and eventhough if your program is not using that field(record length will be incresed by adding the filed in the layout) then it may fail becouse it will take the new load module,
if you are adding any new field to copy book then it is better to recompile all the programs which are all using this copy book
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Mon Nov 20, 2006 6:35 pm    Post subject: Re: Recompiling COBOL programs
Reply with quote

Hi

Thanks for the clarification.Suppose the new field I want to add is a level-88 data item(condition name).What would be the solution in that case?

Thanks
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 6:42 pm    Post subject: Re: Recompiling COBOL programs
Reply with quote

arcvns wrote:
Hi

Thanks for the clarification.Suppose the new field I want to add is a level-88 data item(condition name).What would be the solution in that case?

Thanks


Hi Archana..,

For Condition names also same.., see if you are changing any field of the copy book means in the analysis phase it self you should check which programs are using this copy book and you should recompile all the programs and also you should consider the impacts on all programs by changing field

pls correct me if i miss anything
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Nov 20, 2006 6:44 pm    Post subject:
Reply with quote

If the ** is the only thing you add, to an existing field definition, no recompile is needed.
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 6:55 pm    Post subject:
Reply with quote

William Thompson wrote:
If the ** is the only thing you add, to an existing field definition, no recompile is needed.


Hi..

Please brief me this, adding ** means
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Mon Nov 20, 2006 6:59 pm    Post subject:
Reply with quote

Quote:
For Condition names also same.., see if you are changing any field of the copy book means in the analysis phase it self you should check which programs are using this copy book and you should recompile all the programs and also you should consider the impacts on all programs by changing field



Please let me know what would be the error if I am not recompiling those programs in which the newly added condition is not checked for.


Thanks
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Nov 20, 2006 7:01 pm    Post subject:
Reply with quote

Silly me....** is a shifted 88......
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 7:08 pm    Post subject:
Reply with quote

arcvns wrote:
Quote:
For Condition names also same.., see if you are changing any field of the copy book means in the analysis phase it self you should check which programs are using this copy book and you should recompile all the programs and also you should consider the impacts on all programs by changing field



Please let me know what would be the error if I am not recompiling those programs in which the newly added condition is not checked for.


Thanks



Hi..,

if you are not recompiling means it will take the old load module and run as usuall and that code changes will not considered at all
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Mon Nov 20, 2006 7:17 pm    Post subject:
Reply with quote

Quote:
William Thompson wrote:
If the 88 is the only thing you add, to an existing field definition, no recompile is needed.



From this what I understood is that if I am trying to add one more condition name to a field that has already been defined in the copybook ,no recompile is needed.Correct me If I got u wrong
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Nov 20, 2006 7:21 pm    Post subject:
Reply with quote

Vijayakumar,

If Arcvns only adds an 88, all existing programs don't give a hoot if it is there or not, before it was added, none of them were using it and after it was added are you expecting some of the programs to auto-magicly attempt to re-code themselves?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Mon Nov 20, 2006 7:31 pm    Post subject:
Reply with quote

Quote:

I have a copybook which is used over several programs.I want to add a new field to the copybook which is not referenced in some of the abovesaid programs.Do i need to recompile all the programs?



I think my question is not clear to you.With the addition of the new conditon name some of the programs which were using the copybook were also changed accordingly.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Nov 20, 2006 7:45 pm    Post subject:
Reply with quote

Archana,

Cute, quoting yourself....grin.....

OK, you have a copybook that is used in a number of programs, right?

You changed? added? both? a field? condition name? both? to that copybook, right?

You want to know if the programs that have the copybook but do not reference the field? condition name? that you changed? added? need to be recompiled, right?

That depends on whether or not you physically changed the displacement of fields that those other programs do reference or, if the copybook was used to define a record layout, you changed the length of that record.

Information is power but you are not really providing enough of it for anybody to provide an absolute answer.
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Mon Nov 20, 2006 7:50 pm    Post subject:
Reply with quote

Hi..,

What i mean is.., if you change anything in the copy book or in the program and if you are not recompiling means it will take the old load module i mean it will consider the old program and old copy book only and it wont consider the new program or new copy book..,
so the changes wont affect to the other programs if those programs not compiled
Back to top
View user's profile Send private message
jituitbhu

New User


Joined: 03 Jun 2005
Posts: 3
Location: Pune,India

PostPosted: Mon Nov 20, 2006 11:15 pm    Post subject:
Reply with quote

Hi,
Whenever there is change in the copybook, it's good practice to recompile all the programs which are using the copybook. In this case, even if you don't recompile those programs which are not using this new 88-condition then also, there is not going to be any problem.

In case of any production abend in the program, the production support team may refer to the modified copybook and so it can create confusion to the production support team if not recompiled before.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2165
Location: @my desk

PostPosted: Tue Nov 21, 2006 10:32 am    Post subject: Re: Recompiling COBOL programs
Reply with quote

Hi

Thank u so much.This is exactly what I wanted to know.I hope you understood my problem with the information provided.Thank u all

Regards.
Back to top
View user's profile Send private message
cooldebi

New User


Joined: 19 Apr 2006
Posts: 18
Location: mumbai

PostPosted: Tue Nov 21, 2006 3:05 pm    Post subject: Re: Recompiling COBOL programs
Reply with quote

Archna,
Recomplie all the programs in which that
1. copybook is copied(in the working storage section) ..or

2. if it is passed to any other subroutine with the commarea(if it is an online code)..then compile those subroutines
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm


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