/* This segment of the code has been written to demonstrate the use of basic reporting functions within SAS. In order for us to be able to load the results on the web site the documents were stored as html files.*/ /* printing the report in html format*/ ods listing close; ods html body='c:\forecastingtraining\report.html'; /* use of proc format*/ libname library 'c:\sasfolder'; proc format lib=library; value fee 0-100='low' 101-150='medium' other='high'; /* use of proc report*/ Proc report data=sasuser.admit; column Name age height sex height weight actlevel fee feelevel; define actlevel/group; define fee/order 'Fee of the/service'; define feelevel/computed;/* defining the computed variable*/ compute feelevel; feelevel=fee; endcomp; format fee fee.;/* defining the format of the presentation*/ run; /* getting back the ods listing format*/ ods _all_ close; ods listing; /* use of proc summary.*/ ods listing close; ods html body ='c:\forecastingtraining\summary.html'; proc summary data=sasuser.admit mean min max print; var height weight fee; class sex; output out=work.admit mean=meanheight meanweight meanfee; run; ods _all_ close; ods listing; /* use of proc means*/ ods listing close; ods html body ='c:\forecastingtraining\means.html'; proc means data=sasuser.admit mean min max ; var height weight fee; class sex; run; ods _all_ close; ods listing; /* use of proc frequency*/ ods listing close; ods html body ='c:\forecastingtraining\frequency.html'; proc freq data=sasuser.admit; tables Name*sex/nofreq nocol; run; ods _all_ close; ods listing; ods listing close; ods html body='c:\forecastingtraining\tabulate(class).html'; /*sample of proc tabulate in the following code*/ proc tabulate data=sasuser.admit; var height; class sex; tables height sex /*rows of the table*/ *N /*columns of the table*/; Title 'Sample Tabulate output with class and measure attribute'; Footnote 'Prepared by Mr. Apoorv Chaturvedi for demonstration purposes'; run; ods _all_ close; ods listing;