Following is the list of commonly used numeric functions:
Function | Description | Example |
---|---|---|
DECIMAL | Returns a decimal representation of its argument | DECIMAL(inv_total, 10,3) |
DIGITS | Returns a character string representation of its argument | DIGITS(inv_total) |
FLOAT | Returns a floating point representation | FLOAT(cust_salary) |
INTEGER | Returns an integer representation | INTEGER(cust_salary+.5) |
ABS() | Returns a number's absolute value | ABS(inv_total) |
COS() | Returns the trigonometric cosine of a specified angle | COS(inv_total) |
EXP() | Returns the exponential value of a specific number | EXP(inv_total) |
PI() | Returns the value of PI | PI(inv_total) |
SIN() | Returns the trigonometric sine of a specified angle | SIN(inv_total) |
SQRT() | Returns the square root of a specified number | SQRT(inv_total) |
TAN() | Returns the trigonometric tangent of a specified angle | TAN(inv_total) |
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!