MULTIPLY Statement

The MULTIPLY statement performs arithmetic multiplication.

Format 1

MULTIPLY source BY { result [ROUNDED] } ...

    [ ON SIZE ERROR statement ]

    [ NOT ON SIZE ERROR statement ]

    [ END-MULTIPLY ]

Format 2

MULTIPLY source BY source 

      GIVING { result [ROUNDED] } ...

    [ ON SIZE ERROR statement ]

    [ NOT ON SIZE ERROR statement ]

    [ END-MULTIPLY ]

Syntax Rules

  1. source is a numeric literal or numeric data item.
  2. result is a numeric or numeric edited data item. In Format 1, result may not be numeric edited.
  3. statement is an imperative statement.

General Rules

  1. In Format 1, each result is multiplied by source. The product is stored back in result.
  2. In Format 2, the two source operands are multiplied together. The product is stored in each result variable.
  3. Additional information can be found in Arithmetic Operations, Multiple Receiving Fields, ROUNDED Option, and SIZE ERROR Option.