SiouxCityElvis
Programmer
Hi everyone.
I'm running RMCOBOL-85 on Linux.
I noticed something yesterday when moving a alphanumeric field to a numeric formatted field.
Does a move statement from a PIC X to a PIC 9(8)V9(2) automatically get rid of commas from the PIC X?
Here's my code.
Then WS-PAY-AMT-RFMT-B is put into a record's field with the same format. Later, another program writes records out to a flat file showing the amounts without the decimals. In this case, for some, reason, the comma in the 1,050.30 does not cause any sort of problem. It seems to be handled implicitly somehow - I'm curious, How?
Thanks.
-David
I'm running RMCOBOL-85 on Linux.
I noticed something yesterday when moving a alphanumeric field to a numeric formatted field.
Does a move statement from a PIC X to a PIC 9(8)V9(2) automatically get rid of commas from the PIC X?
Here's my code.
Code:
WORKING-STORAGE SECTION.
01 WS-CSV-AMOUNT PIC X(10).
01 NUMERIC-INTERMEDIATE-STEP PIC X(10).
01 NUMERIC-INTERMEDIATE-EDIT REDEFINES
NUMERIC-INTERMEDIATE-STEP PIC Z(10).
01 WS-PAY-AMT-RFMT-B PIC 9(08)V9(02).
PROCEDURE.
..
..
..
WS-CSV-AMOUNT gets populated with a 1,050.30
MOVE WS-CSV-AMOUNT TO NUMERIC-INTERMEDIATE-STEP.
MOVE NUMERIC-INTERMEDIATE-EDIT TO WS-PAY-AMT-RFMT-B.
...
...
..
Thanks.
-David