View previous topic :: View next topic
|
Author |
Message |
prudhvikumar
New User
Joined: 20 Mar 2007 Posts: 8 Location: hyderabad
|
|
|
|
Hi,
i have redefined a variable with other variables,can i know how much bytes will be occupied for that.
The sample piece of code is shown below.
Code: |
05 (XX)-O-T01-C-CURR-P-X PIC X(03).
05 (XX)-O-T01-C-CURR-B REDEFINES
(XX)-O-T01-C-CURR-P PIC X(03). |
|
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
what is picture clause of (XX)-O-T01-C-CURR-P ? |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi prudhvikumar,
Quote: |
5 (XX)-O-T01-C-CURR-B REDEFINES
(XX)-O-T01-C-CURR-P PIC X(03).
05 (XX)-O-T01-C-CURR-P-X PIC X(03).
|
Your question is not clear will you retype the declarations.
Redefine clause is nothing but allotting same memory to both the variables.
If any change is made to any of the variables it will reflect in both the variables. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi Reddy,
Didn't get you? What else do you expect, as asked earlier.
Abhijit asked the right question, if you are REDEFINing something (here it's (XX)-O-T01-C-CURR-B) then we should know that what memory area is being redefined (more specifically 'what was the picture clasue of the original variable').
Further, in your post three variables, posted by OP, appears just opposite in sequence, how come. I think, 'Quote button' in this forum does not reverse the contents of the post .
P.S.: OP is used for Original Poster. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
i have redefined a variable with other variables,can i know how much bytes will be occupied for that |
The only length that will be "occupied" is the length of the variables defined bafore the redefines. Variables that are part of a redefinition require no additonal bytes - they just re-use the already defined bytes. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi Anuj,
I don't know how it got changed now, But previously it was like that which i specified it in the quote of my post.
Any how now it was clear. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
balakrishna reddy wrote: |
I don't know how it got changed now, But previously it was like that which i specified it in the quote of my post. |
May be some Moderator changed it, not sure though. However, not a matter to worry.
balakrishna reddy wrote: |
Any how now it was clear. |
Good to know.. |
|
Back to top |
|
|
|