PROGRAM FOR RENAMES CLAUSE:
identification division.
program- id.
environment division.
data division.
working-storage section.
01 emp.
02 empdet.
03 name pic x(25).
03 age pic 9(3).
03 sal pic 9(6).
66 paydet renames name thru sal.
procedure division.
p1.
display(1 1) erase.
display(5 5) "Name : ".
accept name.
display(7 5) "Age : ".
accept age.
display(9 5) "Sal : ".
accept sal.
display(1 1) erase.
display(5 5) "Details (Renaming used) : " paydet.
stop run.