Variables are:
05 C-DECIMAL-POINT PIC X(01) VALUE ".".
10 WS-SCHD-PREM-AMT-CHAR PIC X(13).
10 WS-SCHD-INT PIC 9(10).
10 WS-SCHD-DEC PIC 9(2).
At execution:
WS-SCHD-PREM-AMT-CHAR = '247212.12'
UNSTRING WS-SCHD-PREM-AMT-CHAR(A-PROCESS-SCHD-CNT)
DELIMITED BY C-DECIMAL-POINT
INTO WS-SCHD-INT,
WS-SCHD-DEC
END-UNSTRING
Result:
WS-SCHD-INT = 0000247212
WS-SCHD-DEC = ???
Why does the UNSTRING statement not give a result for WS-SCHD-DEC = 12?
Where WS-SCHD-PREM-AMT-CHAR(A-PROCESS-SCHD-CNT) = '247212.12', C-DECIMAL-POINT = "." WS-SCHD-INT PIC 9(10).