View previous topic :: View next topic |
Author |
Message |
rsk Beginner
Joined: 16 Jun 2005 Posts: 2 Topics: 1 Location: chennai
|
Posted: Wed Jun 29, 2005 1:57 am Post subject: doubt on cobol redefines clause |
|
|
In a particular Cobol program there are two 01 level working storage group variables are there. Their structures are as follows:
01 Variable-X.
05 A PIC X(9).
05 B PIC X(10). --------Length of Variable-X is 29 bytes
05 C PIC 9(10).
01 Variable-Y.
05 A1 PIC X(5).
05 B1 PIC X(10). ----------Length of Variable-Y is 35 bytes
05 C1 PIC X(20).
Now I have to redefine the Variable-X with another 01 level variable Variable-Z whose length is greater than the Variable-X. Lets take the length of Variable-Z as 40 bytes. Now my question is whether the last 11 bytes of the Variable-Z(40-29=11) will point to the memory location of the first 11 bytes of the Variable-Y. My basic doubt is whether all the variables in the working storage section will be in contiguous memory location or not?
Regards,
rsk. _________________ Regards,
rsk |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Jun 29, 2005 3:00 am Post subject: |
|
|
No, position of variable-y will be adjusted accordingly. |
|
Back to top |
|
|
rsk Beginner
Joined: 16 Jun 2005 Posts: 2 Topics: 1 Location: chennai
|
Posted: Wed Jun 29, 2005 3:10 am Post subject: |
|
|
Thanks a lot for your reply. _________________ Regards,
rsk |
|
Back to top |
|
|
|
|