Example 2.6 Selecting Observations Unique to Each Data Set When Concatenating Data Sets
Select observations found in only one data set among a group of data sets based on the value of a specific variable. Concatenate the selected observations.
|Featured Step||PROC SORT DATA step|
|Featured Step Options and Statements||MERGE statement with IN= option (match-merge)|
|Related Technique||PROC SQL, OUTER UNION set operator, GROUP BY and HAVING clauses|
Input Data Sets
Data sets MARCHRUNNERS, APRILRUNNERS, and MAYRUNNERS contain the names and running times for the runners in the month that is specified in the data set name.
MARCHRUNNERS Obs runner racetime 1 Sanchez, SO 35:49.4 2 Flores, RX 38:32.8 3 Martinez, KF 36:12.3 4 Hayes, MU 35:24.7 ...