CHAPTER 6

Modifying and Combining SAS Data Sets

Multiple Choice

Short Answer

Programming Exercises

Multiple Choice

  1.   Which DATA step will not overwrite a temporary SAS data set called TOYS?

a.   DATA WORK.toys; SET WORK.toys; RUN;

b.   DATA 'c:\MySASLib\toys'; SET 'c:\MySASLib\toys'; RUN;

c.   DATA toys; SET toys; RUN;

d.   None of the above

  2.   Which statement is required when interleaving data sets but not when stacking data sets?

a.   SET

b.   BY

c.   MERGE

d.   UPDATE

  3.   Suppose the SAS data sets called ONE and TWO contain the following data. How many observations will be in the resulting SAS data set called FIRST?

ONE

ID

Date

123

12/31/2013

456

09/15/2014

TWO

ID

Date

123

05/04/2014

123

06/22/2014

333

01/09/2014 ...

Get Exercises and Projects for The Little SAS Book, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.