O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing to the SAS Log

Default Output to the SAS Log

The previous sample logs show the information that appears in the log by default. You can also write to the log by using the PUT statement or the LIST statement within a DATA step. You can also use the %PUT macro statement anywhere in your program. These statements can be used to debug your SAS programs.

Writing Messages to the SAS Log: The PUT Statement

Introduction to the PUT Statement

The PUT statement enables you to write information that you specify, including text strings and variable values, to the log. Each time the DATA step iterates, the PUT statement is executed, and a message is written to the log. Values can be written in column, list, formatted, or named output style. (For ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required