Introduction to Concatenating SAS Data Sets

Purpose

Concatenating combines two or more SAS data sets, one after the other, into a single data set. The number of observations in the new data set is the sum of the number of observations in the original data sets.
You can concatenate SAS data sets by using one of the following methods:
  • the SET statement in a DATA step
  • the APPEND procedure
If the data sets that you concatenate contain the same variables, and each variable has the same attributes in all data sets, then the results of the SET statement and PROC APPEND are the same. In other cases, the results differ. In this section you will learn both of these methods and their differences so that you can decide which one to use.

Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.