You are on page 1of 1

Difference between RENAMES and REDEFINES

RENAME is nothing but regrouping of data items,it should be given 66 level only
EX.
01 emp-rec
05 emp-name pic x(10).
05 emp-no pic 9(5).
01 emp-sal
05 ta-da pic 9(3).
05 bonus pic 9(3).
66 re-emp renames emp-no thru ta-da.
so re-emp regroups emp-no and ta-da.
REDEFIES:different data items using same memory location.
EX.
01 emp-rec.
05 emp-name pic x(20).
05 ws-emp-rec redefines
10 emp-first-name pic x(5).
10 enp-last-name pic x(5).
in redefines clause redefines variable should follow the first variable.

You might also like