COBOL Zero Supression and Replacement Editing Example
Note! The length of the edited PIC clause may or may not be the same as the original PIC clause.
Editing PICTURE | Input | Output |
---|---|---|
9(3),9(2) | 123.45 | 001,23 |
ZZ,999 | 12345 | 12,345 |
ZZ,999 | 1234 | B1,234 |
ZZ,ZZ9 | 123 | BB123 |
ZZ,ZZ9 | 12 | BBB12 |
**,**9 | 7891 | *7,891 |
**,**9 | 789 | ***789 |
**,*** | ZEROES | ****** |
$**,**9 | 12.34 | $****12 |
**,**9.99 | 123.45 | ***123.45 |