Example 6.1 Updating a Data Set and Controlling Whether Common Variables Are Overwritten with Missing Values

Goal

Update a master data set with values from another data set. Do not replace a nonmissing value in the master data set with a missing value when the value for a common variable in the transaction data is missing. Also add a new variable to the updated master data set.

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 apply the methods to the same master data set. Different transaction data sets are used in Examples 6.1, 6.2, and 6.3. Examples 6.4 and 6.5 use the same transaction data set and produce different resulting data sets.

Example Features

Featured Step ...

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.