The MULTIPLY Statement

General Formats for Format 1


*

General Formats for Format 2


*

Syntax Rules for All Formats

  1. Each identifier must refer to a numeric elementary item, except that in Format 2 each identifier following the word GIVING must refer to either an elementary numeric item or an elementary numeric-edited item.
  2. Each literal must be a numeric literal.
  3. The composite of operands is determined by using all receiving data items. See the topic Arithmetic Statements in the chapter Procedure Division.
  4. OSVSVSC2MF Floating-point data items and literals can be used anywhere a numeric data item or literal can be specified.

General Rules for All Formats

  1. See the topics The ROUNDED Phrase, The ON SIZE ERROR Phrase, Arithmetic Statements, Overlapping Operands and Multiple Results In Arithmetic Statements in the chapter Procedure Division.

General Rules for Format 1

  1. When Format 1 is used, the value of identifier-1 or literal-1 is multiplied by the value of identifier-2. The value of the multiplier (identifier-2) is replaced by this product; similarly for each successive occurrence of identifier-2 in the left-to-right order in which identifier-2 is specified.

General Rules for Format 2

  1. When Format 2 is used, the value of identifier-1 or literal-1 is multiplied by identifier-2 or literal-2 and the result is stored in the data item referenced by each identifier-3.