wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

SAS PG2 - Reading Raw Data Files

Total questions: 13

Worksheet time: 10mins

Name
Class
Date
1.

Which SAS statement allows you to refer to an external raw data file?

a)

DATALINES

b)

INPUT

c)

DATA

d)

INFILE

2.

Which of the following types of data cannot be read with list input?

a)

Missing data indicated by a period

b)

Character data with embedded blanks

c)

Standard numeric data

d)

All of the above

3.

Assuming that the raw data are arranged in neat columns, what is an advantage of column input?

a)

It can read missing data indicated by spaces

b)

It can read embedded blanks

c)

It can read character data longer than eight characters

d)

All of the above

4.

With column input, you cannot do which of the following?

a)

Read data separated by spaces

b)

Specify an informat in the INPUT statement

c)

Read numeric data in scientific notation

d)

All of the above

5.

Given this note in the SAS log, what could you add to fix the INPUT statement so that the ID variable would be read correctly including all digits and hyphens?

a)

A dollar sign

b)

A column range

c)

An informat

d)

None of the above

6.

Which of the following data values would not require an informat?

a)

55.3E2

b)

$2,735

c)

09/21/1960

d)

4,983

7.

Which informat would be appropriate to read the value 09/03/1876?

a)

MMDDYY8.

b)

MMDDYY10.

c)

DATE8.

d)

DATE10.

8.

Which input style is the best for reading date values from raw data?

a)

List

b)

Formatted

c)

Column

d)

All input styles can read date values

9.

Select the INPUT statement that would be appropriate for reading data values for the variables Name, Salary, and Age in the following raw data.

a)

INPUT Name $ Salary DOLLAR11. Age;

b)

INPUT Name $ Salary :DOLLAR11. Age;

c)

INPUT Name $ @10 Salary DOLLAR11. Age;

d)

INPUT Name $ @'$' Salary Age;

10.

Which of the following tells SAS to go to the next line when reading in data?

a)

@

b)

@@

c)

/

d)

+n

11.

Which input style can be used with a double trailing @?

a)

List

b)

Column

c)

Both can be used

d)

Neither can be used

12.

A record that is being held by a trailing @ will be released for which of the following reasons?

a)

The current loop through the DATA step completes

b)

SAS finds a subsequent INPUT statement with no line-hold specifier

c)

Both of these

d)

Neither of these

13.

A record that is being held by a double trailing @ will be released for which of the following reasons?

a)

The current loop through the DATA step completes

b)

SAS finds a subsequent INPUT statement with no line-hold specifier

c)

Both of these

d)

Neither of these