Features: |
|
Other features: |
FORMAT procedure
SYMPUT routine |
Data set: | CUSTOMER_RESPONSE |
data customer_response;
input Customer Factor1-Factor4 Source1-Source3
Quality1-Quality3;
datalines;
1 . . 1 1 1 1 . 1 . .
2 1 1 . 1 1 1 . 1 1 .
3 . . 1 1 1 1 . . . .
. . . more data lines . . .
119 . . . 1 . . . 1 . .
120 1 1 . 1 . . . . 1 .
;
data _null_; if 0 then set customer_response nobs=count; call symput('num',left(put(count,4.))); stop; run;
proc format; picture pctfmt low-high='009.9 %'; run;
proc tabulate data=customer_response;
var factor1-factor4 customer;
table factor1='Cost' factor2='Performance' factor3='Reliability' factor4='Sales Staff', (n='Count'*f=7. pctn<customer>='Percent'*f=pctfmt9.) ;
title 'Customer Survey Results: Spring 1996'; title3 'Factors Influencing the Decision to Buy'; run;
proc tabulate data=customer_response;
var source1-source3 customer;
table source1='TV/Radio' source2='Newspaper' source3='Word of Mouth', (n='Count'*f=7. pctn<customer>='Percent'*f=pctfmt9.) ;
title 'Source of Company Name'; footnote "Number of Respondents: &num"; run;
options formdlim='' number;
data customer_response;
input Customer Factor1-Factor4 Source1-Source3
Quality1-Quality3;
datalines;
1 . . 1 1 1 1 . 1 . .
2 1 1 . 1 1 1 . 1 1 .
3 . . 1 1 1 1 . . . .
. . . more data lines . . .
119 . . . 1 . . . 1 . .
120 1 1 . 1 . . . . 1 .
;
data _null_; if 0 then set customer_response nobs=count; call symput('num',left(put(count,4.))); stop; run;
table factor1='Cost' factor2='Performance' factor3='Reliability' factor4='Sales Staff', (n='Count'*f=7. pctn<customer>='Percent'*f=pctfmt9.) ;
title 'Customer Survey Results: Spring 1996'; title3 'Factors Influencing the Decision to Buy'; run;
table source1='TV/Radio' source2='Newspaper' source3='Word of Mouth', (n='Count'*f=7. pctn<customer>='Percent'*f=pctfmt9.) ;