SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 51626: How to write the contents of the SAS® log or other text output to an HTML, RTF, or PDF file

DetailsCodeOutputAboutRate It

The SAS log window is not an ODS destination, so it cannot be routed directly to an HTML, RTF, or PDF file. A text file can be created from the SAS log using PROC PRINTTO. The output from the text file can then be replayed to any ODS destination using the IMPORT statement in PROC DOCUMENT.

The sample code on the Full Code tab illustrates how to route the text from the SAS log to ODS PDF. The logic is also applicable to SAS code as well as text output written to the SAS Output window (ODS Listing).




These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.