Tip of the Day:November 25
From sasCommunity
sasCommunity Tip of the DayI often need to store a 0 value in place of missing when reporting numeric values. I take advantage of the SUM function for this purpose. For each variable I sum itself with 0 as in: COST=SUM(COST,0); The SUM function ignores missing values. So if COST is not missing, no change occurs. If COST is missing, it is now 0. If only the display of missing values as 0 as needed, use the options statement (which does not change the internal value): options missing = '0 '; Submitted by Terry. Contact me at my Discussion Page. ....read more Feel free to comment on this tip. |