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 row output

Demo: Directing row output

- (narrator) In this demo will create multiple output tables and a single DATA step. And we'll use if then else logic in order to designate which rows should be written to which tables. So in the DATA step that we're starting with, we're creating the storm complete table. And you'll notice that I do have some conditional logic to check the second character in basin. And depending on what that letter is, I want to create a new column named ocean and assign the value Indian, Atlantic or Pacific. Well, I'd like to go one step further. Besides just creating this column ocean, I would like to create three different tables for each ocean. So on the data statement, I'm going to list the three tables I want to create. Now that I have those three tables listed, I can use conditional output statements on the first if statement. I'm going to modify this to make it if substring equal I then do after assigning Indian to ocean then I…

Contents