Methods of Combining SAS Data Sets: The Basics

A common task in SAS programming is to combine observations from two or more data sets into a new data set. Using the DATA step, you can combine data sets in several ways.
Table 13.1 Quick-Reference Overview of Data-Combining Methods
Method of Combining
Illustration
One-to-one reading
Creates observations that contain all of the variables from each contributing data set.
Combines observations based on their relative position in each data set.
Statement: SET
One-to-one merging
Concatenating
Appends the observations from one data set to another.
Statement: SET
Appending
Adds the observations ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.