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,600 courses taught by industry experts.

Demo: Directing column output

Demo: Directing column output

- [Instructor] In this example, we'll control which columns are read in and out of the PDV with the drop= or keep= data set options. And I'm using Enterprise Guide for this demo because want to take advantage of the data step debugger to see a little bit what's going on behind the scenes. So the program we're starting with is where we finished with the last demonstration. We're creating three different tables for Indian, Atlantic, and Pacific. Notice we're also calculating a new column, MaxWindKM, so we have wind measurements in both miles per hour, as well as kilometers per hour. So, depending on the table, I want to keep one or both of those columns. So, after the Indian table on the data statement, I'm going to add the drop= data set option. And in that table, I'd like to drop MaxWindMPH. After Atlantic, I'll drop MaxWindKM. And after Pacific, I'm not going to put anything, because I want to keep all columns. Next…

Contents