110 Handbook of SAS
®
DATA Step Programming
Observations arecombined based on their relative position in each data set.
The rst observation in the rst data set, for example, is combined with the
rst observation in the remaining data sets. The number of observations in
the combined data set is equal to the number of observations in the smallest
input data set. If the input data sets share common variables, only the values
read in from the last data set are kept. Here’s the syntax for reading two
input data sets using one-to-one reading:
SET data-set-1;
SET data-set-2;
Program 7.4 utilizes one-to-one reading to combine data sets RECORD1 and
RECORD2. Notice that the number of observations in the combined data
set is 4, which is equal to the numb ...