Home » SAS Output Delivery System

SAS Output Delivery System

by Online Tutorials Library

SAS Output Delivery System

In the previous topic, we have learned how to use SQL queries in the data set to create, read, update, and delete table values. Now, in this topic, we are going to learn what SAS ODS- Output Delivery System is and how we can create various types of output files.

SAS Output Delivery System is used to convert the output of the SAS program into more user-friendly forms like HTML, PDF, etc. We can do that by using the ODS (Output Delivery System) statement, which is available in the SAS software.

It is preferred to format output of the SAS program for useful reports which are suitable for viewing and understanding. It also helps in sharing the output with other platforms and software goods and combines the results of multiple PROC statements in a single file.

Syntax:

Where,

PATH: It is a statement which is used to convert SAS program output into the HTML form. For other forms, we use the filename instead of the pathname.

Style: It represents the in-built styles available in the SAS environment.

We can create three types of files as output in the SAS:

  • HTML File Output
  • PDF File Output
  • RTF or Word File Output

Creating HTML Output

We can create an HTML file as output when we need to send the output on the web. SAS provides the ODS HTML statement to create an HTML file as an output of the SAS program. In the example, we are going to create an HTML file in our desired path. We are applying style EGDefault, which is already available in the styles library.

After executing the above code in SAS Studio, the output file as HTML will be generated in a mentioned path. We can download this HTML file to save it in a different environment from the SAS.

SAS Output Delivery System

Please note that we used two PROC SQL Statement in the code; it doesn’t mean that their output will be captured in two separate files; it will be captured in the same file.

Output:

SAS Output Delivery System

Creating PDF Output

SAS provides the ODS PDF statement to create a PDF file as an output of the SAS program. In the example, we are going to create a PDF file in our desired path. We are applying style EGDefault, which is already available in the styles library.

After executing the above code in SAS Studio, the output will be generated as a PDF file in a mentioned path. We can download this PDF file to save it in a different environment from the SAS.

SAS Output Delivery System

Please note that we used two PROC SQL Statement in the code; it doesn’t mean that their output will be captured in two separate files; it will be captured in the same file.

Output:

SAS Output Delivery System

Creating RTF (Word) Output

SAS provides the ODS RTF statement to create an RTF file as an output of the SAS program. In the example, we are going to create an RTF file in our desired path. We are applying style EGDefault, which is already available in the styles library.

After executing the above code in SAS Studio, the output will be generated as an RTF file in a mentioned path. We can download this RTF file to save it in a different environment from the SAS.

SAS Output Delivery System

Please note that we used two PROC SQL Statement in the code; it doesn’t mean that their output will be captured in two separate files; it will be captured in the same file.

Output:

SAS Output Delivery System


Next TopicSAS Variable

You may also like