COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-135
MULTIPLY BY
Example 9-45 converts a length in feet to a length in inches.
Example 9-46 converts several dimensions from centimeters to inches, with rounding.
Example 9-45. MULTIPLY BY Statement
05 LENGTH PICTURE S9(6)V9(6).
...
MULTIPLY 12 BY LENGTH
Example 9-46. 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