When combining SAS data sets,
you can process observations conditionally, based on which data set
contributed that observation. You can do the following:
-
determine which data set contributed
each observation in the combined data set
-
create a new data set that includes
only selected observations from the data sets that you combine
-
determine when SAS is processing
the last observation in the DATA step so that you can execute conditional
operations, such as creating totals
You have seen some of these concepts in earlier topics,
but in this section you will apply them to the processing of multiple
data sets. The examples use the SET statement, but you can also use
all of the features that are discussed here with the MERGE, MODIFY,
and UPDATE statements.