Match-merging combines observations from two or more data sets into a single observation in a new data set according to the values of a common variable.
When match-merging, use the MERGE statement rather than the SET statement to combine data sets.
Syntax, DATA step for match-merging:
MERGE SAS-data-set-1 SAS-data-set-2;
BY <DESCENDING> variable(s);