Chapter Review Quiz


Accessing Data

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

  1. In which portion of a SAS data set are the following found?

    • The name of the data set.

    • The type of the variable Salary.

    • The creation date of the data set.

     a.   descriptor portion
     b.   data portion


  2. In this PROC CONTENTS output, what is the default length of the variable Month?

    Alphabetic List of Variables and Attributes
    #
    Variable
    Type
    Length
    1
    Month
    Num
    ?

     a.   2 bytes
     b.   8 bytes
     c.   16 or 17 bytes
     d.   32,767 bytes


  3. Which LIBNAME statement has the correct syntax?

     a.  
    libname reports 's:\workshop';
     b.  
    libname orion s:\workshop;
     c.  
    libname 3456a 's:\workshop';


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

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


  5. In this data set, what type of variable is Employee_ID?

    Obs
    Employee_ID
    Last
    Salary
    1
    .
    Ralston
    29250
    2
    120101
    Lu
    163040
    3
    120104
    Billington
    46230
    4
    120105
    Povey
    27110
    5
    120106
    Hornsey
    .

     a.   character
     b.   numeric
     c.   temporary
     d.   missing


  6. What type of data set is the input data set in this PROC PRINT step?

    proc print data=order_fact;
    run;
     a.   temporary
     b.   permanent
     c.   There is not enough information to determine the type.


  7. A numeric variable can store numeric values with a maximum of eight digits.

     a.   True
     b.   False


  8. Which of the following is not true of SAS date values?

     a.   They are numeric.
     b.   They can be positive of negative values.
     c.   They represent the number of days between the day being stored and a base date.
     d.   The base date is January 1, 1900.


  9. Which statement about SAS libraries is true?

     a.   You refer to a SAS library by a logical name called a libname.
     b.   A SAS library is a collection of one or more SAS files that are referenced and stored as a unit.
     c.   A single SAS library can contain files that are stored in different physical locations.
     d.   At the end of each session, SAS deletes the contents of all SAS libraries.


  10. Which of the following librefs is valid?

     a.   orionstar
     b.   orion/01
     c.   or_01
     d.   1_or_a