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 11: Reading SAS Data Sets

  1. If you submit the following program, which variables appear in the new data set?
    data work.cardiac(drop=age group); 
       set clinic.fitness(keep=age weight group); 
       if group=2 and age>40; 
    run;
    
    1. none
    2. Weight
    3. Age, Group
    4. Age, Weight, Group
    Correct answer: b
    The variables Age, Weight, and Group are specified using the KEEP= option in the SET statement. After processing, Age and Group are dropped in the DATA statement.
  2. Which of the following programs correctly reads the data set Orders and creates the data set FastOrdr?
    1. data catalog.fastordr(drop=ordrtime); 
         set july.orders(keep=product units price); 
         if ordrtime<4; 
         Total=units*price; 
      run;
      
    2.  data catalog.orders(drop=ordrtime); set ...

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