Using an Index to Combine Data

Overview

Suppose you want to combine data from two data sets, and one of the data sets is much larger than the other. Also, suppose you want to select only those observations from the larger data set that match an observation from the smaller data set according to the value of one or more common variables.
You should already know how to create an index on a SAS data set. You have learned that PROC SQL can take advantage of an index to improve performance on a join. You can also take advantage of an index in a DATA step to combine data from matching observations in multiple data sets if the index is built on variables that are common to all input data sets.
For example, suppose you want to combine data from the ...

Get SAS Certification Prep Guide, 4th 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.