STAT 3094 Lecture 10: STAT-3094 - Lecture 10A - Combining SAS Datasets
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 combines the sas dataset by observation number. The new sas dataset will contain all of the variables from the sas datasets in the set statements used. The number of observations in the new sas dataset will equal the number of observations in the smallest. You can have more than two datasets, the datasets do not have to have the same number of observations, and the sas datasets can have common variables (all not required). Common variables are sas variables located in at least two of the original sas datasets sharing the same name. In most cases, a common variable is needed to keep up with most records. Common variables make combining sas datasets a little more complicated.