Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Which of the following can you use to position the input pointer on a specific record?
    1. column pointer controls
    2. column specifications
    3. line pointer controls
    4. line hold specifiers
  2. Which pointer control is used to read multiple records sequentially?
    1. @n
    2. +n
    3. /
    4. all of the above
  3. Which pointer control can be used to read records non-sequentially?
    1. @n
    2. #n
    3. +n
    4. /
  4. Which SAS statement correctly reads the values for Fname, Lname, Address, City, State, and Zip in order?
    Raw Data File
    1.  input Fname $ Lname $ / 
            Address $20. /  
            City $ State $ Zip $;
    2. input Fname $ Lname $ /; 
            Address $20. /; 
            City $ State $ Zip $; 
    3. input / Fname $ Lname $ 
            / Address $20. 
            City $ State $ Zip $;
    4. input / Fname $ Lname $; 
            / Address $20.; 
            City $ State $ Zip $;
  5. Which INPUT statement correctly reads the values for ID in the fourth record, and then returns to the first record to read the values for Fname and Lname?
    Raw Data File
    1. input #4 ID $5. 
            #1 Fname $ Lname $;
    2.  input #4 ID $ 1-5 
            #1 Fname $ Lname $; 
    3. input #4 ID $ 
            #1 Fname $ Lname $;
    4. all of the above
  6. How many records are read for each execution of the following DATA step?
    Raw Data File
    data spring.sportswr; 
       infile newitems;    
       input #1 Item $ Color $ 
             #3 @8 Price comma6. 
             #2 Fabric $ 
             #3 SKU $ 1-6; 
    run; 
    1. one
    2. two
    3. three
    4. four
  7. Which INPUT statement correctly reads the values for City, State, and Zip?
    Raw Data File
    1. input #3 City $ State $ Zip $;
    2. input #3 City & $11. State $ Zip $;
    3. input #3 City $11. +2 State $2. + 2 Zip $5.;
    4. all of the above
  8. Which program does not read the values in the first record as a variable named Item and the values in the second record as two variables named Inventory and Type?
    Raw Data File
    1. data perm.supplies; 
         infile instock pad; 
         input Item & $16. / 
               Inventory 2. Type $8.; 
      run;
    2. data perm.supplies; 
         infile instock pad; 
         input Item & $16. 
               / Inventory 2. Type $8.;
       run;
    3. data perm.supplies; 
         infile instock pad; 
         input #1 Item & $16. 
               Inventory 2. Type $8.; 
      run;
    4. data perm.supplies;
         infile instock pad;
         input Item & $16. 
               #2 Inventory 2. Type $8.; 
      run;
  9. Which INPUT statement reads the values for Lname, Fname, Department, and Salary (in that order)?
    Raw Data File
    1. input #1 Lname $ Fname $ /  
            Department $12. Salary comma10.;
    2. input #1 Lname $ Fname $ /  
            Department : $12. Salary : comma.;
    3.  input #1 Lname $ Fname $  
            #2 Department : $12. Salary : comma.;
    4. both b and c
  10. Which raw data file poses potential problems when you are reading multiple records for each observation?
    1. Raw Data File
    2. Raw Data File
    3. Raw Data File
    4. Raw Data File
Last updated: January 10, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.39.144