Sample SAS Output

Default HTML Output in the SAS Windowing Environment

In SAS 9.3, the default destination is HTML when running SAS in the windowing environment for the Windows and UNIX operating environments, and the output is displayed in the SAS Results Viewer Window.
title 'Student Weight';
   proc print data=sashelp.class; 
      where weight>100;
   run;
quit;
Default HTML Output in the Windowing Environment
Default HTML Output in the Windowing Environment
Note: At SAS start-up, unless you have previously closed the HTML destination, output is sent to the WORK directory by default. If you close the HTML destination and re-open it in the same SAS session, all output goes to the current directory rather than the WORK directory. You do not have to specify ODS HTML CLOSE; to view your output.

Traditional SAS LISTING Output in the SAS Windowing Environment

If you are running SAS in windowing mode and want to send your output to the LISTING destination, you can use ODS statements to change the destination from HTML to LISTING, as shown in this example. If you want a more permanent solution, you can change your settings so that every time you run SAS, your output is sent to the LISTING destination by default. For information about how to change these settings, see How to Restore 9.2 Behavior in SAS Output Delivery System: User's Guide.
In this example, the output destination is changed from HTML to LISTING by specifying the ODS LISTING and ODS HTML CLOSE statements. By changing the output destination to LISTING, the output is automatically displayed as a list report in the SAS Output Window as shown in this example.
ods html close;
ods listing;
options nodate;

title 'Students';
     proc print data=sashelp.class; 
      where weight>100;
     run;
quit;
ods html;
ods listing close;
Listing Output in the Windowing Environment
Listing Output in the Windowing Environment
See the procedure descriptions in the Base SAS Procedures Guide for examples of output from SAS procedures. For a discussion and examples of DATA step output, see the FILE Statement in SAS Statements: Reference and the PUT Statement in SAS Statements: Reference.