01 A pic S9(3) COMP3
01 B REDEFINES A pic S9(6) COMP
Pd.
MOVE 100 TO B.
DISPLAY B ?
Kinda got a problem, IIRC, 9(6) comp will occupy 4 bytes, while 9(3) comp3 will occupy 2 bytes, and I think COBOL gets really upset with a larger data area redefining a smaller one (he's OK with smaller redefining larger)....abkumarch wrote:01 A pic S9(3) COMP3
01 B REDEFINES A pic S9(6) COMP
MOVE 100 TO B.
DISPLAY B ?