INT: Finding the Greatest Integer
Available Languages: reporting, Maintain
The INT function returns the integer component of a number.
Find the Greatest Integer
INT(in_value)
in_value
Numeric
Is the value for which the integer component is returned, the name of a field that contains the value, or an expression that returns the value. If you supply an expression, use parentheses as needed to ensure the correct order of evaluation.
Note: INT does not use an output argument.
The format of the result is floating-point double precision.
Finding the Greatest Integer
INT finds the greatest integer in DED_AMT.
INT(DED_AMT)
For $1,261.40, the result is 1261.
For $1,668.69, the result is 1668.
INT finds the greatest integer in the DED_AMT field and stores it in INT_DED_AMT:
TABLE FILE EMPLOYEE SUM DED_AMT AND COMPUTE INT_DED_AMT/I9 = INT(DED_AMT);BY LAST_NAME BY FIRST_NAME WHERE (DEPARTMENT EQ 'MIS') AND (PAY_DATE EQ 820730); END
The output is:
LAST_NAME FIRST_NAME DED_AMT INT_DED_AMT --------- ---------- ------- ----------- BLACKWOOD ROSEMARIE $1,261.40 1261 CROSS BARBARA $1,668.69 1668 GREENSPAN MARY $127.50 127 JONES DIANE $725.34 725 SMITH MARY $334.10 334