Chapter 6

Modifying and Combining SAS Data Sets

Multiple Choice

Short Answer

Programming Exercises

Multiple Choice

1. The data sets APR, MAY, and JUN have one observation for each day in the corresponding month. How many observations will be in the resulting data set called MONTHS?

DATA months;

  SET apr may jun;

RUN;

a. 0

a. 30

b. 60

c. 91

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 ...

Get Exercises and Projects for The Little SAS Book, Sixth 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.