The only difference between the two results is the format. You sort dataset B where you added the format a best20.; - which results into mean=0.15524999999999. If you round that result to 8 characters, which is the default, you get the mean=0.155250 (= 0.15525) thanks for answer Shmuel, but: a) which step is rounding it to 8 characters and why in first scenario this 'default' rounding didn't work ? b) why you think there is different format? dataset B has best20. format, after sorting there is still best20. format, and when proc summary is creating output there is again best20. format. final dataset 'out_b' in both scenarios has still the same format best20.
... View more