• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Any SAS expert here? Round function not working as expected

Status
Not open for further replies.

IHAVEAQUESTION

Golden Member
proc sql;
select 'ARM-90', count (*)
from sf_mlis.mlis_sf_arm_201212 a, sf_mlis.mlis_sf_wlm_201212 w
where a.loan_NBR = w.loan_NBR
and INITIAL_FIXED_RATE_PD <> round (((FIRST_INT_RESET_DTE - FIRST_PMT_DTE)/30.4),1.0);
quit;

This works fine in Oracle but converting to SAS, it shows error for missing value for the Round function. Basically, we want 90 days shown as 3, 70 days shown as 2, and anything less than 30 days shown as 1...etc.
 
Don't know why retired British forces would know but programming help is that way.
<--- · Software/ Programming
 
Computing Results in Special Cases
The ROUND function computes the result by multiplying an integer by the rounding unit when all of the following conditions are true:
The rounding unit is not an integer.
The rounding unit is not a power of 10.
The rounding unit is not the reciprocal of an integer.
The result that you expect from decimal arithmetic has no more than four decimal places.

Maybe too long?
 
Wouldn't that need to be in the select field? Right now you're using it as a condition... unless what you want to do and what you said you want to do are different.


and case when would probably work better given the decimal constraint.
 
Status
Not open for further replies.
Back
Top