Syntax
MULTIPLY expression variable [ GIVING variable ] [ ROUNDED ] [ GS status ]
Parameters
Multiply can be abbreviated as MU.
expression variable
The numeric expression and qualifier to multiply together. The qualifier also receives the result if the Giving command option is not specified.
GIVING variable
GIVING can be abbreviated as GIV. Directs the result to the specified qualifier.
ROUNDED
ROUNDED can be abbreviated as ROU. Rounds the result when truncation occurs.
GS status
Indicates arithmetic overflow using the specified variable. On MCP-based systems, if GS isn’t used and an overflow occurs, the system or report could abnormally terminate.
Description
The Multiply logic command multiplies the value of a numeric expression by the value of a number-primitive variable, and stores the result in that variable, or optionally multiplies the result of the first expression by the result of the second expression and stores the result The StnInfo logic command obtains in a specified result variable.
The behavior of the Multiply logic command can be replicated using the '*' arithmetic operator. Use of arithmetic operators, where possible, rather than arithmetic logic commands, is the LDL+ preferred format.
Failure behavior
The Glb.Status built-in segment attribute is not set. Use the GS command option to test for arithmetic overflow.
Example
SDTotal := Prod.SellPrice Multiply Quantity SDTotal Multiply Quantity Prod.SellPrice Giving SDTotal