I tried it on mainframe.
01 WS-CHANGE.
05 WS-CHANGE-IN1 PIC X(20) VALUE SPACE.
05 WS-CHANGE-OUT PIC S9(4) COMP-3.
.....
INITIALIZE WS-CHANGE-OUT.
MOVE WS-CHANGE-IN1 TO WS-CHANGE-OUT.
DISPLAY 'STRING: ' WS-CHANGE-OUT 'OK'.
The maxcc return 4. The compiler said Alphanumeric or national sending fields 'WS-CHANGE-IN1' exceed 18 digits. The right most 18 characters were used as the sender.
But if I give compiler option ARITH(EXTEND), the maxcc=0. The result show 0000.
When i code like this WS-CHANGE-IN1 PIC X(32) VALUE SPACE, even give compiler option ARITH(EXTEND), the maxcc still return 4.
--------------------------------------------------------------------------------------------------------------
Thanks ^_^
Hubery.