Combining Data with the DATA Step Match-Merge

The DATA Step Match-Merge

You should already know how to merge multiple data sets in the DATA step when there is a BY variable that is common to each of the input data sets. When you use the MERGE statement to perform a table lookup operation, your lookup values must be stored in one or more SAS data sets. This technique requires that both the base table and the lookup table or tables be either sorted by or indexed on the BY variable or variables.
You can specify any number of input data sets in the MERGE statement as long as all input data sets have a common BY variable. The MERGE statement can combine data sets of any size. The MERGE statement is capable of returning multiple values. You can use ...

Get SAS Certification Prep Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.