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
 

 

Copy Books changes with Redefines Clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Copy Books changes with Redefines Clause
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Copy Books changes with Redefines Clause
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: 2150
Location: At my coffee table

PostPosted: Thu Jun 05, 2008 9:15 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Jun 05, 2008 9:52 pm    Post subject: Reply to: Copy Books changes with Redefines Clause
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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


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