data abcd; infile cards DLM = ','; input name $ (a1-a3) ($) price quant; cards; s,m,l,c,70,20 a,m,l,a,33.55,54 a,g,l,a,60,32 o,m,r,a,20,68 an,m,l,c,40,12 h,m,r,a,20,44 i,m,r,a,20.1,12 k,m,r,a,35,22 r,g,r,a,46,100 b,m,l,a,31,66 ; run; Using the data above. proc report data= abcd MISSING nowindows; column a2 (price quant),(a3 SUM),MEAN; rbreak after / summarize OL; define a3 / across; define a2 / group; run; Above process is equivalent to; proc report data= abcd MISSING nowindows; column a2 (price,a3,MEAN price,sum,MEAN quant,a3,MEAN quant,sum,MEAN); rbreak after / summarize OL; define a3 / across; define a2 / group; run; Which results in an error, so first process should really give out an error too. But instead it did something like below; proc report data= abcd MISSING nowindows; column a2 (price,a3,MEAN price,sum quant,a3,MEAN quant,sum); rbreak after / summarize OL; define a3 / across; define a2 / group; run; But with no printed values for quant,a3,MEAN. I’m just trying to understand the syntaxes. I don’t understand why SAS does this for this particular example. What am I missing?
... View more