Re: Can someone try it arrays?

Regardless of the final approach, I would suggest cutting down the number of comparisons. Using your original code:

if not missing(col99) then do; if ~missing(col1) then col11=put(col1,3.)||' ('||put((col1/col99)*100,5.1)||')'; if ~missing(col2) then col21=put(col2,3.)||' ('||put((col2/col99)*100,5.1)||')'; if ~missing(col3) then col31=put(col3,3.)||' ('||put((col3/col99)*100,5.1)||')'; if ~missing(col4) then col41=put(col4,3.)||' ('||put((col4/col99)*100,5.1)||')'; if ~missing(col5) then col51=put(col5,3.)||' ('||put((col5/col99)*100,5.1)||')';

end;

That suggestion could easily be applied to an array-based solution, such as: