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

Copy Books changes with Redefines Clause


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arif.md

New User


Joined: 13 Jun 2005
Posts: 10

PostPosted: Wed Jun 04, 2008 3:18 pm
Reply with quote

I have made the changes to the Copy Book where in, I have added a field with Redefines Clause. See the below example.


Existing Copy Book
01 VAR1 PIC X(10).

Changes to the Copy Book, I have added this line in the copy book.
01 VAR2 REDEFINES VAR1 PIC X(10).

Now, in this case, Do I need to RECOMPILE the existing programs which are using this other fields of the copy book but not using VAR2.

Thanks
Arif
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Wed Jun 04, 2008 3:40 pm
Reply with quote

You don't have to . But it is always a good practice to recompile all the programs whenever a copybook used by them is changed.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Jun 04, 2008 4:04 pm
Reply with quote

As Manuneedhi told,
It helps in the future changes...
Back to top
View user's profile Send private message
arif.md

New User


Joined: 13 Jun 2005
Posts: 10

PostPosted: Thu Jun 05, 2008 8:55 pm
Reply with quote

Thanks a lot. I have one more question related copy book changes and recompilation.

The situation is

Existing copy book

01 VAR-AREA OCCURS 5 TIMES.
20 VAR-REAS PIC X(5).
20 VAR-AMT PIC S9(7)V99 COMP-3.

Changed
01 VAR-AREA OCCURS 6 TIMES.
20 VAR-REAS PIC X(5).
20 VAR-AMT PIC S9(5)V99 COMP-3.

OCCURS is changed from 5 to 6 and the data type of VAR-AMT is changed from S9(7)V99 COMP-3 to S9(5)V99 COMP-3.

Total memory is same in both the cases.

Here in this case Do I need to recompile the existing programs which are using the fields.
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: Thu Jun 05, 2008 9:15 pm
Reply with quote

For the first post, no, you do not have to recompile any program that does not reference VAR2.
The second post, you must recompile every program that references VAR-AMT and every program that moves VAR-AREA to some other storage and expects to get the VAR-AMT data there.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 05, 2008 9:52 pm
Reply with quote

what are the standards in Your organization?
do they accept mismatched timestamps in the dependencies ???

proga depends on copybook booka
progb depends on the same copybook , but with the latest changes

booka and progb climb the promotion ladder up to production..

and now You have a timestamp mismatch between proga and booka
( from an audit point of view, but that will mean anyway lots of paperwork to explain why )

in the long run always rebuilding everything might be the less troublesome approach
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top