Example 6.5 Saving Observations from Only the Master Data Set When the Transaction Data Set Contains Duplicates

Goal

Match a master data set and transaction data set where the master data set has only unique combinations of the values of the matching variables and the transaction data set can have multiple combinations. Keep only the observations from the master data set in the output data set. Order the observations in the transaction data set so that a specific observation from the transaction data set is kept in the output data set when there are multiple matches for a combination of the values of the matching variables.

Examples 6.1, 6.2, 6.3, 6.4, and 6.5 illustrate ways to update common variables when combining data sets. The five examples ...

Get Combining and Modifying SAS® Data Sets: Examples Second 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.