- proc format;
- picture pctfmt (round)
- 0 = " " (noedit)
- 0 <-< 1 = " (<1%)" (noedit)
- 1 - < 10 = "0%)" (prefix=" (")
- 10 - < 100 = "00%)" (prefix=" (")
- 100 - high = " (100%)" (noedit) ;
- run;
- data b;
- set a;
- a2=put(a1,2.)||put(100*a1/&n,pctfmt.);
- run;