when I move a negative COMP-3 or a COMP field to a CHAR field, I missing the negative sign in the CHAR field.
Is it possible to get the sign in the CHAR field only with the MOVE below (e.g. using a special Compiler Option)?
We use COBOL 6.1
Exampel :
028010 05 VALUE-P PIC S9(09) COMP-3
028020 VALUE -123456789.
028021 05 VALUE-C PIC S9(09) COMP
028022 VALUE -123456789.
028200
028300 05 OUT-P PIC X(20).
028310 05 OUT-C PIC X(20).
Result :
004601 MOVE VALUE-P TO OUT-P
004602 MOVE VALUE-C TO OUT-C
000280 K 05 VALUE-P > -123456789 PACKED
000282 K 05 VALUE-C > -123456789 FULLWORD
----+----1----+----2
000285 K 05 OUT-P > 123456789
----+----1----+----2
000286 K 05 OUT-C > 123456789
Thanks in advance for help