One-to-One Merging

Definition of One-to-One Merging

When you use the MERGE statement without a BY statement, SAS combines the first observation in all data sets you name in the MERGE statement into the first observation in the new data set, the second observation in all data sets into the second observation in the new data set, and so on. In a one-to-one merge, the number of observations in the new data set is equal to the number of observations in the largest data set that you name in the MERGE statement.

Performing a Simple One-to-One Merge

Input SAS Data Set for Examples

The instructor of a college acting class wants to schedule a conference with each student. One data set, CLASS, contains these variables:
Name
specifies the student's ...

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.