ods html file = "Y:/cars/cars.xls";
proc sql;
title "Cars";
select
make,model,type,origin,drivetrain
from sashelp.class
where engine size gt 3;
quit;
假设在 SAS 中运行上述查询后,我将获得 excel 格式的输出。那么,如何通过 proc 报告步骤获得相同的输出?
你不会从中获得太多输出,因为sashelp.class中没有任何汽车。
基本处理报告步骤将如下所示:
title "Cars";
proc report data=sashelp.cars nowd;
where enginesize gt 3;
columns make model type origin drivetrain;
run;
我不会使用 PROC REPORT 只是为了做到这一点 - PROC REPORT 的重点是您可以使用的所有其他功能,介于格式选项、摘要选项等之间。