From the course: SAS® 9.4 Cert Prep: Part 12 Combining Tables
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Handling column attributes - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 12 Combining Tables
Handling column attributes
- [Instructor] When multiple tables are listed in a set statement, columns from the first table are added to the PDV with their corresponding attributes. When SAS reads the second table in the set statement the attributes of any columns that are already in the PDV cannot be changed. For the name column, the length is already set and cannot be modified. You can solve this problem by using the length statement. In this example, the length statement explicitly defines the column name to be character with a length of nine. The length statement must come before the set statement so that the attributes of name are established in the PDV before name is read from SAS help dot class.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.