MULTIPLY {Identifier-1} BY { Identifier-2 [ROUNDED] } ... {Literal-1 } [ ON SIZE ERROR Imperative-Statement-1 ] [ NOT ON SIZE ERROR Imperative-Statement-2 ] [END-MULTIPLY] |
MULTIPLY {Identifier-1} BY {Identifier-2} {Literal-1 } {Literal-2 } GIVING { Identifier-3 [ROUNDED] } ... [ ON SIZE ERROR Imperative-Statement-1 ] [ NOT ON SIZE ERROR Imperative-Statement-2 ] [END-MULTIPLY] |
move 20 to ws-factor move 10 to ws-age multiply 2 by ws-age *> resulting value of ws-age : 20 multiply ws-factor by ws-age on size error display message "size error" end-multiply *> resulting value of ws-age : 400 *> if ws-age is only pic 9(2) the "size error" message will be displayed move 10 to ws-age move 20 to ws-age2 move 15 to ws-age3 multiply 2 by ws-age ws-age2 *> resulting values: ws-age = 20 , ws-age2 = 40, ws-age3 = 30 |
move 5.99 to ws-radius multiply 3.141593 by ws-radius rounded *> If ws-radius is pic 9(3)v9(3), result will be : 18.818 *> If ws-radius is pic 9(3)v9(2), result will be : 18.82 |
move 5.99 to ws-radius multiply 3.141593 by ws-radius rounded giving ws-result end-multiply *> If ws-result is pic 9(3)v9(3), result will be : 18.818 *> If ws-result is pic 9(3)v9(2), result will be : 18.82 |