Hi @SamSays,
@SamSays wrote:
I've tried one of those picture formats (low-high) but it doesn't work because I also want it to round.
Picture formats do round if you use the ROUND option:
proc format;
picture pctfmt (round) 0-high='0009.9%';
run;
As demonstrated below, this picture format displays non-negative values x<999.95 exactly like the PERCENT8.1 format displays x/100.
247 data chk;
248 do n=0 to 999949;
249 x=n/1000;
250 p1=put(x, pctfmt.);
251 p2=put(x/100, percent8.1);
252 if p1 ne p2 then output;
253 end;
254 run;
NOTE: The data set WORK.CHK has 0 observations and 4 variables.
However, the PERCENT8.1 format adds an unnecessary trailing blank, so that variable p2 has length 8, whereas p1 has length 7, which is the default length of the format. Unlike PERCENT8.1, the picture format would also display larger values up to 9999.949... correctly.
... View more