COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
results in A being replaced by 4 x A and B being replaced by 16 x B.
• Operand Identification
For each multiplier, operand identification occurs just prior to the multiply-and store
operation. For example, in the statement
MULTIPLY 4 BY A B C(B)
the subscript is not evaluated until B has been multiplied by 4. See Operand Identification
(page 242).
• Arithmetic Operations
See Arithmetic Operations (page 257) for information on data conversion and alignment,
intermediate results, multiple results (and subscript evaluation), and incompatible data.
• Precision
If you omit the SIZE ERROR phrase, arithmetic overflow can cause the run unit to terminate
abnormally. For information on precision of multiplication, see Arithmetic Precision (page 261).
• ROUNDED and SIZE ERROR Phrases
See ROUNDED Phrase (page 244) and SIZE ERROR Phrase (page 244) for information on these.
Example 114 converts a length in feet to a length in inches.
Example 114 MULTIPLY BY Statement
05 LENGTH PICTURE S9(6)V9(6).
...
MULTIPLY 12 BY LENGTH
Example 115 converts several dimensions from centimeters to inches, with rounding.
Example 115 MULTIPLY BY Statement With ROUNDED Phrase
03 CM-TO-INCHES PICTURE S9V99
VALUE 0.39.
...
03 LENGTH PICTURE S9(3)V9(2).
03 WIDTH PICTURE S9(3)V9(2).
03 DEPTH PICTURE S9(3)V9(2).
...
MULTIPLY CM-TO-INCHES BY LENGTH ROUNDED
WIDTH ROUNDED
DEPTH ROUNDED
MULTIPLY GIVING
MULTIPLY GIVING multiplies two data items and stores the product in one or more other data
item(s); for example, the statement
MULTIPLY A BY B GIVING C D E
means store A x B in C, D, and E.
MULTIPLY 373










