STAT 3094 Lecture 10: STAT-3094 - Lecture 10B - Combining SAS Datasets II (Match-Merging)
Document Summary
Combining sas datasets refer to joining them horizontally or vertically by observation or by a set of sas variables. There are four ways to combine sas datasets: one-to-one reading, concatenating, interleaving, match-merging. The goal is match-merging is to link observations together using the values of the variables listed in the by statement. It is required that all of the original sas datasets being merged are sorted by the variables in the by statement before performing this operation: example: match-merging. First, use proc sort to sort the data. Second, use a data step to link the observations by the specified variable. Then, sas will search for the first set of observations with the lowest value for idnum. In this case, it is the missing value in the third dataset (see presentation). However, only the third dataset has a blank value. Sas will send all of the observation records through the pdv before making a dataset.