Features: |
BY statement SUM statement |
Other features: |
ODS CSVALL statement SORT procedure TITLE statement : #BYVAL specification
|
Data set: | EXPREV |
options nodate pageno=1 linesize=80 pagesize=40 obs=10 nobyline;
proc sort data=exprev; by sale_type; run;
proc print data=exprev noobs label sumlabel n='Number of observations for the order type: ' 'Number of observations for the data set: ';
var country order_date quantity price;
label sale_type='Sale Type' price='Total Retail Price* in USD' country='Country' order_date='Date' quantity='Quantity';
sum price quantity; by sale_type;
format price dollar7.2;
title 'Retail and Quantity Totals for #byval(sale_type) Sales'; run;
options byline;
proc print data=exprev noobs label sumlabel n='Number of observations for the order type: ' 'Number of observations for the data set: ';
label sale_type='Sale Type' price='Total Retail Price* in USD' country='Country' order_date='Date' quantity='Quantity';
options nodate pageno=1 obs=10 nobyline;
ods csvall file='your_file.csv';
proc sort data=exprev; by sale_type; run;
proc print data=exprev noobs label sumlabel n='Number of observations for the order type: ' 'Number of observations for the data set: ';
var country order_date quantity price;
label price='Total Retail Price* in USD' country='Country' order_date='Date' quantity='Quantity';
sum price quantity; by sale_type;
format price dollar7.2;
title 'Retail and Quantity Totals for #byval(sale_type) Sales'; run;
options byline;
ods csvall close;