SUBTRACT statement.

The SUBTRACT statement is used to subtract one, or the sum of two or more, numeric data items from one or more items, and set the values of one or more items equal to the results.

Format 1.

          SUBTRACT { identifier-1 } ... TO { identifier-2 [ ROUNDED ] } ...
                   { literal-1    }

                [ [ ON ] SIZE ERROR imperative-statement-1 ]
                [ NOT [ ON ] SIZE ERROR imperative-statement-2 ]

                [ END-SUBTRACT ]

Format 2.

          SUBTRACT { identifier-1 } ... TO { identifier-2 }
                   { literal-1    }        { literal-2    }

                  GIVING { identifier-3 [ ROUNDED ] } ...

                [ [ ON ] SIZE ERROR imperative-statement-1 ]
                [ NOT [ ON ] SIZE ERROR imperative-statement-2 ]

                [ END-SUBTRACT ]

Format 3.

          SUBTRACT { CORRESPONDING } identifier-4 TO identifier-5 [ ROUNDED ]
                   { CORR          }

                [ [ ON ] SIZE ERROR imperative-statement-1 ]
                [ NOT [ ON ] SIZE ERROR imperative-statement-2 ]

                [ END-SUBTRACT ]