Introduction to Merging SAS Data Sets

Purpose

Merging combines observations from two or more SAS data sets into a single observation in a new SAS data set. The new data set contains all variables from all the original data sets unless you specify otherwise.
In this section, you will learn about two types of merging: one-to-one merging and match merging. In one-to-one merging, you do not use a BY statement. Observations are combined based on their positions in the input data sets. In match merging, you use a BY statement to combine observations from the input data sets based on common values of the variable by which you merge the data sets.

Prerequisites

Before continuing with this section, you should understand the concepts that are presented ...

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.