SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Merging SAS Data Sets
Match-Merge Processing


The Compilation Phase: Setting Up the New Data Set

To prepare to merge data sets, SAS software

  1. reads the descriptor portions of data sets listed in the MERGE statement
  2. reads the remainder of the DATA step program
  3. creates the program data vector (PDV)
  4. assigns a tracking pointer to each data set listed in the MERGE statement.

If variables with the same name appear in more than one data set, the variable from the first data set that contains the variable (in the order listed in the MERGE statement) determines the length of the variable.

compilation phase

The illustration above shows match-merging during the compilation phase. After reading the descriptor portions of the data sets Clients and Amounts, SAS software
  1. creates a program data vector for the new Claims data set containing all variables from the two data sets. Note that although NAME appears in both input data sets, it appears in the program data vector only once.

  2. assigns tracking pointers to Clients and Amounts.

back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement