Adding to the suggestions by @ballardw here is a third method
Data want;
set have;
if age > <limit> then age=limit;
run;
And a fourth method:
Do nothing, it's not an outlier. An age of 40 seems to me to be not an outlier, but we don't know how you collected the data, and what population you collected the data from.
So, @gtucke1 to quote from @ballardw, "Which to choose depends on your needs/wants which have not been very clearly stated." YOU have to decide what to do about a given outlier, YOU have to state your needs. We can write the code, but we can't tell you what the right decision is.
... View more