O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12: Combining SAS Data Sets

  1. Which program will combine Brothers.One and Brothers.Two to produce Brothers.Three?
    image
    1. data brothers.three;
         set brothers.one; 
         set brothers.two; 
      run;
      
    2. data brothers.three; 
         set brothers.one brothers.two; 
      run;
      
    3. data brothers.three;
         set brothers.one brothers.two; 
         by varx; 
      run;
      
    4. data brothers.three;
         merge brothers.one brothers.two; 
         by varx; 
      run;
      
    Correct answer: a
    This example is a case of one-to-one matching, which requires multiple SET statements. Where same-named variables occur, values that are read from the second data set replace those read from the first data set. Also, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required