Directing SAS Output and the SAS Log |
Understanding the Default Destination |
Within the SAS windowing environment, the default destination for most procedure output is a monospace listing that appears in the Output window. However, you can use the Output Delivery System (ODS) to change which destinations are opened and closed.
Each time you execute a procedure within a single session, SAS appends the output to the existing output. To view the results, you can
scroll the Output window, which contains the output in the order in which you generated it
use the Results window to select a pointer that is a link to the procedure output.
In the SAS windowing environment, the default destination for the SAS log messages is the Log window. When you execute a procedure, SAS appends the log messages to the existing log messages in the Log window. You can scroll the Log window to see the results. To print your log messages, execute the PRINT command. To clear the contents of the Log window, execute the CLEAR command. When your session ends, SAS automatically clears the window.
Within the SAS windowing environment, you can use the PRINTTO procedure to route log messages or procedure output to a location other than the default location, just as you can in other methods of operation. For details, see Routing the Output and the SAS Log with PROC PRINTTO. You can also use ODS to change the destination of the procedure output.
For additional information about using ODS, viewing procedure output, and changing the destination of the procedure output, see Understanding and Customizing SAS Output: The Basics.
Storing the Contents of the Output and Log Windows |
If you want to store a copy of the contents of the Output or Log window in a file, then use the FILE command. On the command line, specify the FILE command followed by the name of the file:
file 'file-to-store-contents-of-window' |
SAS has a built-in safeguard that prevents you from accidentally overwriting a file. If you inadvertently specify an existing file, then a dialog box appears. The dialog box asks you to choose a course of action, provides you with information, and might prevent you from overwriting the file by mistake. You are asked whether to:
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.