I've had a curiosity about code below. And for reference, I've used SAS university version. DATA dept;
INPUT name $18. +1 hired DATE7.
+1 salary 5. +1 pct PERCENT5.1;
FORMAT hired YYMMDD10. salary DOLLAR9.1
pct PERCENT7.1;
CARDS;
Martin, Virginia 09aug98 34800 12.5%
Singleton, MaryAnn 24apr99 27900 26.3%
Leighton, Maurice 16dec15 32600 18.9%
Freuler, Carl 15feb88 29900 11.2%
Cage, Merce 19oct00 39800 23.1%
;
PROC PRINT DATA=dept;
RUN; let us look at percent format syntax! In input sentence, PERCENT5.1 is fine in running code, but in format sentence, PERCENT length is at least 7. I tried to write PERCENT5.1 in format sentence, but pct values are truncated like 13%, 26%, etc. Why are they different? I thought that It isn't problem that Input length and output(format) length are same. So, could you fix my error of thought?
... View more