%DecMult meta-SQL element
Syntax
%DecMult(a,b)
Description
The %DecMult meta-SQL function returns a number representing a multiplied by b, where a and b are numeric expressions.
If the result needs to be picked up by a bind variable, pick it up using the Character type or PIC X(50).
Note:
%DecMult is replaced with a simple multiplication function on all platforms except for the DB2 for OS/390 and z/OS platform. On this platform, it is converted to MULTIPLY_ALT. The MULTIPLY_ALT scalar function returns the product of the two arguments as a decimal value. It is provided as an alternative to the multiplication operator, especially when the sum of the precision of the arguments exceeds 31.
Note:
If you receive an overflow error using this meta-SQL, you may need to use the CAST function on the MSSQL, ORACLE, DB2UNIX and DB2 for OS/390 platforms.
Parameters
| Parameter | Description |
|---|---|
|
a |
Specify a number to be multiplied. |
|
b |
Specify a number to use for multiplying. |
Example
%DecMult(12.3, 34.67)
%DecMult(c1 + c2, c3)
In the example, c1, c2, and c3 are fields of the Number data type.