Skip to Content
Carpenter's Complete Guide to the SAS REPORT Procedure
book

Carpenter's Complete Guide to the SAS REPORT Procedure

by Art Carpenter
February 2013
Intermediate to advanced
490 pages
14h 35m
English
SAS Institute
Content preview from Carpenter's Complete Guide to the SAS REPORT Procedure
Appendix 1: Exercise Solutions 407
define percent/ computed 'Product*Percentage'
format=percent10.2;
break after year/ summarize suppress skip;
compute before year;
total = profit.sum;
endcomp;
compute percent;
percent = profit.sum/total;
endcomp;
compute yeartxt / char length=7;
if _break_ = ' ' and year ne . then yeartxt = put(year,4.);
else if _break_ = ' ' and year = . then yeartxt = ' ';
else if _break_='_RBREAK_' then yeartxt = 'Overall';
else yeartxt = 'Total';
endcomp;
compute after;
line ' ';
line @5 'Total Profits in US dollars was ' profit.sum dollar14.2;
endcomp;
run;
The last few lines of the report show ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Carpenter's Guide to Innovative SAS Techniques

Carpenter's Guide to Innovative SAS Techniques

Art Carpenter
SAS ODS Graphics Designer by Example

SAS ODS Graphics Designer by Example

Sanjay Matange, Jeanette Bottitta

Publisher Resources

ISBN: 9781599944272