View previous topic :: View next topic
|
Author |
Message |
vinayn
New User
Joined: 13 Jun 2005 Posts: 10
|
|
|
|
01 Group variable.
02 a pic 9(5) Value is 12345.
02 b redefines a.
Display b .
suppose if b contains some value which was declared in the program elsewhere(before redefines) ... and if we display the value of b after redefining .. will it be 12345 or the value of b...(think that b has a value of 6789.)
i mean to ask that it will only take the storage area only or value of the storage area that it contains..
Whether the B value contains 12345 or 6789. |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
HI,
YOU CAN NOT DEFINE THE B BEFORE REDIFINE BECAUSE IT GIVES ERROR 'USER WORD IS MULTI-DEFINED'. 'ITEM REDEFINED BY REDEFINES CLAUSE IS NOT DEFINED CORRECTLY'.
IT WILL IDENTIFING STORAGE AREA MEANS IT WILL AUTOMATICALY STORAGE VALUE ALSO.
THANKS,
THANOOZ. |
|
Back to top |
|
|
Karthikt
New User
Joined: 15 Aug 2005 Posts: 51
|
|
|
|
Hi,
You can move a value to 'b' down the line in the program. And if you issue DISPLAY statement it will display the value of B. I verfied this information in File aid. |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
What thanooz and Karthikt said are both true, coming back to ur Q.
Quote: |
suppose if b contains some value which was declared in the program elsewhere(before redefines) ... |
This can never happen as u cannot define a variable twice, u wud get an error like what thanooz said. The storage area can contain only one value at a time, suppose if u have 12345 in it originally, both A and B will have it . Unless down in Procedure Division u move another value to it. |
|
Back to top |
|
|
|