Definition of Merging

Merging combines observations from two or more SAS data sets into a single observation in a new data set.
A one-to-one merge, shown in the following figure, combines observations based on their position in the data sets. You use the MERGE statement for one-to-one merging.
Figure 16.3 One-to-One Merging
One-to-One Merging
A match-merge, shown in the following figure, combines observations based on the values of one or more common variables. If you are performing a match-merge, use the MERGE statement along with a BY statement.
In the following example, two data sets are match-merged by the value of the variable Year.
Figure 16.4 Match-Merging ...

Get Step-by-Step Programming with Base SAS 9.4 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.