View previous topic :: View next topic
|
Author |
Message |
vinodmaanju
New User
Joined: 10 May 2005 Posts: 28 Location: Pune
|
|
|
|
Hi,
One of my interviewer at IBM was asked about implicit redefine and explicit redefine and difference between them. Anyone can explain it
Thanks |
|
Back to top |
|
|
senthils
Active User
Joined: 15 Nov 2005 Posts: 117 Location: Chennai, India
|
|
|
|
Explicit redefines is the one which you give in the Working-Storage section.
ex: 05 WS-TO-DATE1 REDEFINES WS-TO-DATE
Implicit redefines is the one which comes into effect in FILE section FD. If the FD of a file contains more than one 01 level number, the second 01 level variable redefines the first 01 level variable.
ex:
FD SAMPLE-FILE.
01 SAMPLE-REC1.
02 FILLER PIC X(80).
01 SAMPLE-REC2.
02 FILLER PIC X(70).
In the above example SAMPLE-REC1 and SAMPLE-REC2 share the same memory location even though we are not doing any REDEFINES. So it is called Implicit Redefines. |
|
Back to top |
|
|
vinodmaanju
New User
Joined: 10 May 2005 Posts: 28 Location: Pune
|
|
|
|
Thanks Mr. senthils |
|
Back to top |
|
|
|