The MULTIPLY statement causes numeric data items to be multiplied and stores the result.

Format 1:Multiply…By


Format 2: Multiply…Giving


In Format 1, the value of identifier-1 or literal-1 is multiplied by the value of each identifier-2. The value of each multiplier (identifier-2) is replaced by this product.

In Format 2, the value of identifier-1 or literal-1 is multiplied by identifier-2 or literal-2 and the result is stored in each identifier-3.

Each identifier must refer to a numeric elementary item, except that in Format 2, the identifiers following the word GIVING may refer to either an elementary numeric item or an elementary numeric edited item.

Each literal must be a numeric literal.

Additional rules and explanations regarding features of the MULTIPLY statement that are common to other arithmetic statements can be found in the discussion of common rules. See in particular the discussions of the ROUNDED phrase, the size error condition, overlapping operands, modes of operation, composite size, and incompatible data.

MULTIPLY Statement Examples

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

COBOL Topics