Chapter Review Quiz


Reading Spreadsheet and Database Data

Select the best answer for each question. When you are finished, click Submit Quiz.

  1. In this SAS/ACCESS LIBNAME statement, what does oracle represent?

    libname sports oracle
            user=edu001 pw=edu001
            path=dbmssrv schema=educ;
            
     a.   libref
     b.   option
     c.   table name
     d.   engine name


  2. Which PROC step successfully prints a list of all data sets in the orionx library without printing descriptor portions for the individual data sets?

     a.  
    proc contents data=orionx.nods _all_;
    run;
    
     b.  
    proc contents data=orionx._all_ nods;
    run;
    
     c.  
    proc print data=orionx._all_ noobs;
    run;
    
     d.  
    proc print data=orionx._all_ nods;
    run;
    


  3. When you use the SAS/ACCESS LIBNAME statement to assign a libref to a Microsoft Excel workbook, you can view the workbook using SAS Explorer or Microsoft Excel.

     a.   True
     b.   False


  4. When you use the SAS/ACCESS LIBNAME statement to assign a libref to a Microsoft Excel workbook, SAS treats each worksheet within the workbook as a library.

     a.   True
     b.   False


  5. What does the program shown here create?

    libname sales excel 'c:\mydata\annual.xls';
    
    data sales.qtr1_2011;
       set sasdata.qtr1_2011;
    run;
    
    data sales.qtr2_2011;
       set sasdata.qtr2_2011;
    run;
     a.   a data set named sales.qtr1_2011 and a data set named sales.qtr2_2011
     b.  
    a.an Excel workbook named sales.qtr1_2011 and an Excel workbook named sales.qtr2_2011
     c.  
    a.an Excel workbook named annual that contains two worksheets, qtr1_2011 and qtr2_2011
     d.  
    a.an Excel workbook named sales that contains two worksheets, qtr1_2011 and qtr2_2011


  6. What statement is used to read an Oracle table in a DATA step?

     a.   DATA statement
     b.   WHERE statement
     c.   SET statement
     d.   assignment statement


  7. A SAS name literal is a string that contains one or more special characters, enclosed in quotation marks, followed by the letter n.

     a.   True
     b.   False


  8. When a date value is read from a worksheet, it is converted automatically to a SAS date. Which SAS format is used to display the value?

     a.   MMDDYY8.
     b.   MMDDYY10.
     c.   DATE7.
     d.   DATE9.


  9. When a SAS data set is created from a spreadsheet, the spreadsheet column headings are always stored as which of the following?

     a.   variable names
     b.   labels
     c.   formats
     d.   descriptor


  10. A WHERE statement or a subsetting IF can be used to subset a Microsoft Excel worksheet.

     a.   True
     b.   False