You are on page 1of 3

Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in

the appendix.

1. How long do librefs remain in effect?

a. until the LIBNAME statement is changed

b. until the LIBNAME statement is cleared

c. until the SAS session ends

d. all of the above

2. Which of the following statements are true?

a. When using the default engine, you do not have to specify the libref in the

LIBNAME statement.

b. When using the default engine, you do not have to specify the engine name in the

LIBNAME statement.

c. When using the default engine, you do not have to specify the SAS library in the

LIBNAME statement.

d. When using the default engine, you have to specify the libref, engine name, and

the SAS library in the LIBNAME statement.

3. When you specify an engine for a library, what are you specifying?

a. the file format for files that are stored in the library

b. the version of SAS that you are using

c. permission to access to other software vendors' files

d. instructions for creating temporary SAS files

4. Which statement prints a summary of all the files stored in the library named Area51?

a. proc contents data=area51._all_ nods;

b. proc contents data=area51 _all_ nods;

c. proc contents data=area51 _all_ noobs;

d. proc contents data=area51 _all_.nods;

5. Which of the following programs correctly references a SAS data set named

SalesAnalysis that is stored in a permanent SAS library?


a.

data saleslibrary.salesanalysis;

set mydata.quarter1sales;

if sales>100000;

run;

b. data mysales.totals;

set sales_2017.salesanalysis;

if totalsales>50000;

run;

c. proc print data=salesanalysis.quarter1;

var sales salesrep month;

run;

d. proc freq data=2017data.salesanalysis;

tables quarter*sales;

run;

6. What type of information does the CONTENTS procedure create?

a. the contents of a library

b. descriptor information for an individual SAS data set

c. a and b only

d. none of the above

7. Assuming you are using SAS code, which one of the following statements is false?

a. LIBNAME statements can be stored with a SAS program to reference the SAS

library automatically when you submit the program.

b. When you delete a libref, SAS no longer has access to the files in the library.

However, the contents of the library still exist on your operating system.

c. Librefs can last from one SAS session to another.

d. You can access files that were created with other vendors' software by submitting

a LIBNAME statement.
8. What does the following statement do?

libname states 'c:\myfiles\sasdata\popstats';

a. defines a library called States using the Popstats engine

b. defines a library called Popstats using the States engine

c. defines the default library using the default engines

d. defines a library called States using the default engine

You might also like