Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference between REDEFINES and RENAMES

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

New User


Joined: 15 Mar 2005
Posts: 4
Location: Chennai

PostPosted: Wed Mar 16, 2005 2:51 pm    Post subject: Difference between REDEFINES and RENAMES
Reply with quote

Hi friends,
Can u plz explain the difference in using RENAMES and REDEFINES with example.
Back to top
View user's profile Send private message

narena

New User


Joined: 16 Mar 2005
Posts: 18

PostPosted: Wed Mar 16, 2005 3:12 pm    Post subject: Redefines & Renames
Reply with quote

Renames clause will be used to regrouping of elementary data items

Redefines clause will points to same memory area with different names.
Back to top
View user's profile Send private message
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
Location: chennai, india

PostPosted: Wed Mar 16, 2005 7:14 pm    Post subject:
Reply with quote

Hi ,

renames clause is used for display the same data in different name , this one also shares the same memory just like ur redefines.
Back to top
View user's profile Send private message
rick

New User


Joined: 18 Jun 2004
Posts: 59
Location: Chennai

PostPosted: Wed Mar 16, 2005 7:45 pm    Post subject:
Reply with quote

Hi Sameer,

Dont get confused ? Renames clause is re-grouping of the already existing structure. It is used when u need to use a already existing structure. So different memory are allocated for both.

In case of Redefine clause it uses the already existing memory. So there is no seperate memory allocated for redefined item.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Sat Mar 19, 2005 6:19 pm    Post subject:
Reply with quote

hi,
Rename clause allocates different memory where as redefines just the same memeory. For element to be rename it must be decalred in 66 level whereas for redefining both should be defined in 01 level.Redefines points to the same memory location with different name. like if variable is redefined with variable2 then if you move any data to varibale then same will reflected in variable2(if they same contains same memory area).You can directly see how redefines works, just create one flat file and the record layout is one include and in that include redifined then in file aid just try to change one value see the redefined variable value also get updated.
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Sat Mar 19, 2005 6:47 pm    Post subject: mistake in above reply
Reply with quote

sorry to say what i said before as rename doesn't allocates different memory but it rearranges differenet elementy item with new name.
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
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us