View previous topic :: View next topic
|
Author |
Message |
urnarendra
New User
Joined: 29 Jun 2005 Posts: 7
|
|
|
|
hello,
Can i redefine x(1) to x(2).is it possible?
01 a pic x.
01 b redefines a pic x(2). is it correct?
i read in some FAQS x(100) to x(200) is possible? please give any body correct anawer.
Regards
urnarendra |
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
Yes, It's possible according to ANSI - 85 standards only if both the variables declared in 01 Level. |
|
Back to top |
|
|
sudhaaa
New User
Joined: 24 Mar 2005 Posts: 51
|
|
|
|
Hi Narendra,
Redefines is mainly for utilizing memory space.
A PIC X
B REDIFINES A PIC XX.
MOVE 1 TO A.
DISPLAY B.
Now B will contain 1b. ( b for space).
Any corrections welcome.
Regards,
Sudhaaa. |
|
Back to top |
|
|
sats456
New User
Joined: 29 May 2005 Posts: 12
|
|
|
|
I wud say best wud be to try writing a small prograam to test it out if your compiler supports it ... |
|
Back to top |
|
|
urnarendra
New User
Joined: 29 Jun 2005 Posts: 7
|
|
|
|
hello priya,
in ANSI 74 we can redefine one variable into any other variable with same length(we can not increase or decrease the size).but in ANSI 85 standard we can decrease the size but we can not increase(you can read boo).i am working in Z/OS .in that i am trying to increase the size its working perfectely.but in OS/390 (in real time) it can not work.in faq's they told increase is possible.but is not possible.i attend one interview in that interview i face this question but i told it possible that time the interviewer told me it is not possible.
corrections are welcome.............
thanks®ards,
k.narendra. |
|
Back to top |
|
|
|