SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Merging SAS Data Sets
Excluding Unmatched Observations


Question: Write a subsetting IF statement that selects observations for subsequent processing only if all three input data sets contributed to the current observation.
     data mergdata.emppay;
        merge reps(rename=(office=officenumber) in=inreps)
              empinfo.sales(in=insales) 
              empinfo.bonuses(in=inbonus);
by id; run;

           

  back||next

 

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

Terms of Use & Legal Information | Privacy Statement