Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Based upon your example PIC and assuming this is display-numeric and NOT packed-decimal, the decimal position is implied (it doesn't exist) and the data occupies five-bytes. Therefore, after a move to a PIC X(05) field, it would still equal '12345' (X'F1F2F3F4F5'), but you would lose the implied decimal position.
If you were going to move it to a PIC X(05) field, then use reference modification, which will ensure that the data remains as-is.
EG -
Code: |
03 WS-DECIMAL PIC 999V99 VALUE 123.45.
03 WS-ALPHA PIC X(05).
MOVE WS-DECIMAL (1:) TO WS-ALPHA (1:).
|
Bill |
|