View previous topic :: View next topic
|
Author |
Message |
ensameer
New User
Joined: 15 Mar 2005 Posts: 4 Location: Chennai
|
|
|
|
Hi friends,
Can u plz explain the difference in using RENAMES and REDEFINES with example. |
|
Back to top |
|
|
narena
New User
Joined: 16 Mar 2005 Posts: 18
|
|
|
|
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 |
|
|
muthukumarapandian
New User
Joined: 08 Oct 2004 Posts: 42 Location: chennai, india
|
|
|
|
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 |
|
|
rick
New User
Joined: 18 Jun 2004 Posts: 59 Location: Chennai
|
|
|
|
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 |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
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 |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
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 |
|
|
|