Excluding Unmatched Observations

Overview

By default, DATA step match-merging combines all observations in all input data sets. However, you may want to select only observations that match for two or more specific input data sets.
Excluding Unmatched Observations
Excluding Unmatched Observations
To exclude unmatched observations from your output data set, you can use the IN= data set option and the subsetting IF statement in your DATA step. In this case, you use
  • the IN= data set option to create and name a variable that indicates whether the data set contributed data to the current observation
  • the subsetting IF statement to check the IN= values and write to the ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third 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.