Using the Output Delivery System (ODS)
SAS features a complicated, but powerful mechanism to format the somewhat voluminous reports that it produces. The Output Delivery System (ODS) allows the results of analyses to be created for the web (in HTML format), postscript, or Microsoft Word rich-text format (rtf).
For now, we will use ODS only to produce results that can be copied easily into Word documents. To do this, add the following statements around the procedures you want ODS to output to a file:
ODS RTF FILE='c:\temp\class2.RTF';
proc print data=one;
var name sex age;
ODS RTF CLOSE;
The output will be save in the temp folder in a RTF file called 'class2.rtf'
You can enclose your entire program with the two statements if you want all your output in one file, or you can save separate files for separate parts of your results.