SAS Quiz: Lesson 2

Your score:
90%
Congratulations! Your score indicates that you have mastered the topics in this lesson. You can review the feedback and when you’re finished, exit the lesson.
CorrectIn this PROC CONTENTS output, what is the default length of the Birth_Date column?#VariableType4Birth_DateNum3Customer_AddressChar1Customer_IDNum2Customer_NameChar
 a.  4 bytes b.  8 bytes c.  32,767 bytes d.  It doesn’t have a default length.
Your answer: b
Correct answer: b


Birth_Date is a numeric column, and all numeric columns in SAS are 8 bytes by default.
CorrectWhich LIBNAME statement has the correct syntax? a.  libname reports "filepath/workshop"; b.  libname orion filepath/workshop; c.  libname 3456a "filepath/workshop";
Your answer: a
Correct answer: a


The libref must start with a letter or an underscore and contain eight characters maximum.  The path must also be in quotation marks.
CorrectWhich of the following tables is available at the beginning of a new SAS session? a.  sales b.  work.newsalesemps c.  sashelp.class
Your answer: c
Correct answer: c


The Sashelp library contains sample and resource tables provided by SAS. The library is automatically available when SAS starts.
CorrectIn this table, what type of column is Employee_ID?ObsEmployee_IDLastSalary1.Ralston292502120101Lu1630403120104Billington462304120105Povey271105120106Hornsey. a.  character b.  numeric c.  temporary d.  missing
Your answer: b
Correct answer: b


Missing numeric values are represented with a period, so Employee_ID must be a numeric column.
CorrectWhich statement about SAS dates is false? a.  A SAS date is one of three SAS column types: numeric, character, and date. b.  SAS dates represent the number of days from January 1, 1960. c.  SAS date values can be positive or negative. d.  SAS date values can be used in calculations.
Your answer: a
Correct answer: a


SAS columns are either character or numeric. SAS date values are numeric values that represent the number of days before or after January 1, 1960.
CorrectWhich LIBNAME statement has the correct syntax for reading a Microsoft Excel file? a.  libname excel "filepath/myexcelfile"; b.  libname mydata xlsx "filepath/myexcelfile"; c.  libname mydata xlsx "filepath/field_data.xlsx";
Your answer: c
Correct answer: c


After the libref, the XLSX engine is specified. The full path to the Excel file, including the .xlsx file extension, must be provided in quotation marks.
CorrectWhich library name (libref) is valid? a.  2010Car b.  car/2010 c.  car2010 d.  cars_2010
Your answer: c
Correct answer: c


This libref follows all three rules for valid librefs. A libref must have a length of one to eight characters, and must begin with a letter or underscore. The remaining characters must be letters, numbers, or underscores.
CorrectTo disassociate a libref that you previously assigned, you can use the UNASSIGN option in the LIBNAME statement. a.  True b.  False
Your answer: b
Correct answer: b


Use the CLEAR option in the LIBNAME statement to disassociate an assigned libref.
IncorrectWhat does this code do?proc import datafile=”d:/collect817/bird_count.csv” dbms=csv out=bird817 replace; run;
 a.  It creates a SAS data set named bird817 in the work library from the CSV file bird_count and replaces bird817 whenever the CSV file is updated. b.  It creates a SAS data set named bird817 in the work library from the CSV file bird_countc.  It uses the CSV engine to directly read the data file bird_count.csv.
Your answer: a
Correct answer: b


This PROC IMPORT step creates a SAS data set from a CSV file. When the code runs, it replaces the SAS data set if it already exists.
CorrectIn which portion of a SAS data set are the following found?name of the data settype of the column Salarycreation date of the data set a.  descriptor portion b.  data portion
Click here to order similar paper @Udessaywriters.com.100% Original.Written from scratch by professional writers.

You May Also Like

About the Author: admin