Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Which SAS statement associates the fileref Crime with the raw data file C:StatesDatacrime.dat?
    1. filename crime 'c:statesdatacrime.dat';
    2. filename crime c:statesdatacrime.dat;
    3. fileref crime 'c:statesdatacrime.dat';
    4. filename 'c:statesdatacrime' crime.dat;
  2. Which type of delimited file does PROC IMPORT read by default?
    1. logical record-length files
    2. varying record-length files
    3. fixed record-length files
    4. illogical record-length files
  3. Which program correctly imports only the first seven observations from the external file?
    1. options obs=7;
      proc import data="C:users	est.txt"
        out=exam
        dbms=dlm
        replace;
      run;
      proc print data=exam;
      run;
    2. proc import datafile="c:users	est.txt"
        out=exam
        dbms=dlm
        replace;
        options obs=7;
      run;
      proc print data=exam;
      run;
      
    3. proc import datafile="c:users	est.txt"
        out=exam
        dbms=dlm
        replace;
      run;
      proc print data=exam (obs=7);
      run;
      
    4. proc import datafile="c:users	est.txt"
        out=exam
        dbms=dlm
        replace;
      run;
      proc print data=exam;
        options obs=7;
      run;
      
  4. Which of the following pieces of information does SAS need in the DATA step in order to read an Excel workbook file?
    1. a libref to reference the Excel workbook to be read
    2. the name and location (using another libref) of the new SAS data set
    3. the name of the Excel worksheet that is to be read
    4. all of the above
  5. Which statement should you use if you want PROC IMPORT to generate SAS variable names from the data values in the first row of an input file?
    1. getnames=no;
    2. datarow=1;
    3. guessingrows=1;
    4. getnames=yes;
  6. Which of the following is referencing a fully qualified single external file?
    1. filename workbook 'C:certdataclass1.csv';
      proc import datafile=workbook.class
        dbms=csv
        out=class1
        replace;
        getnames=yes;
      run;
    2. filename workbook 'C:certdataworkbook.txt';
      proc import datafile=workbook
        dbms=dlm
        out=workbook
        replace;
        getnames=yes;
      run;
      
    3. filename workbook 'C:certdataworkbook.txt';
      proc import datafile=class01
        dbms=dlm
        out=class01work
        replace;
        getnames=yes;
      run;
    4. all of the above.
  7. What does the SAS/ACCESS LIBNAME statement reference?
    1. a SAS library
    2. a tab-delimited text file
    3. a Microsoft Excel workbook
    4. a comma-delimited file
  8. Which delimited input file can be imported using PROC IMPORT?
    1. Name&&&&&Gender&&&Age
      Joyce&&&&F&&&&&&&&11
      Thomas&&&M&&&&&&&&11
      Jane&&&&&F&&&&&&&&12
      Louise&&&F&&&&&&&&12
      James&&&&M&&&&&&&&12
      John&&&&&M&&&&&&&&12
      Robert&&&M&&&&&&&&12
      Alice&&&&F&&&&&&&&13
      
    2. "Africa","Boot","Addis Ababa","12","$29,761","$191,821","$769"
      "Asia","Boot","Bangkok","1","$1,996","$9,576","$80"
      "Canada","Boot","Calgary","8","$17,720","$63,280","$472"
      "Eastern Europe","Boot","Budapest","22","$74,102","$317,515","$3,341"
      "Middle East","Boot","Al-Khobar","10","$15,062","$44,658","$765"
      "Pacific","Boot","Auckland","12","$20,141","$97,919","$962"
      "South America","Boot","Bogota","19","$15,312","$35,805","$1,229"
      "United States","Boot","Chicago","16","$82,483","$305,061","$3,735"
      "Western Europe","Boot","Copenhagen","2","$1,663","$4,657","$129"
    3. Region State Capital Bird
      South Georgia Atlanta 'Brown Thrasher'
      South 'North Carolina' Raleigh Cardinal
      North Connecticut Hartford Robin
      West Washington Olympia 'American Goldfinch'
      Midwest Illinois Springfield Cardinal
    4. all of the above
  9. To override the DATA step default behavior that writes observations to output, what should you use in a DATA step?
    1. DROP= and KEEP= data set options
    2. an OUTPUT statement
    3. an OUT= option
    4. a BY statement
Last updated: August 23, 2018
..................Content has been hidden....................

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