From the course: SAS® 9.4 Cert Prep: Part 08 Controlling Data Step Processing

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Viewing execution in the log

Viewing execution in the log

- [Instructor] If you don't have access to the interactive DATA Step Debugger in Enterprise Guide, you can add PUTLOG statements at strategic points in your code, so you can examine the contents of the PDV during execution. The _ALL_ keyword writes all columns in the PDV and their values to the log, and column= enables you to write specific columns and their values to the log. You can also specify a message to write to the log. In this example, the obs= data set option limits the number of rows that the SET statement reads, so the data step only iterates twice. After the SET statement, SAS executes the PUTLOG statement and writes the message PDV After SET Statement to the log. Then putlog_all_ writes all the columns and values in the PDV to the log. At the end of the two iterations of the data step, you can examine the log to see the PDV values for each of the two rows.

Contents