cobol SUBTRACT statement SUBTRACT example


Example

SUBTRACT item-a item-b item-c FROM account-z ROUNDED MODE IS NEAREST-EVEN
    ON SIZE ERROR
        DISPLAY "CALL THE BOSS, Account `Z` is OUT OF MONEY" END-DISPLAY
        PERFORM promisary-processing
    NOT ON SIZE ERROR
        PERFORM normal-processing
END-SUBTRACT