NEW
Font size
WorksheetsSAS PG2 - Reading Raw Data Files
Total questions: 13
Worksheet time: 10mins
Which SAS statement allows you to refer to an external raw data file?
DATALINES
INPUT
DATA
INFILE
Which of the following types of data cannot be read with list input?
Missing data indicated by a period
Character data with embedded blanks
Standard numeric data
All of the above
Assuming that the raw data are arranged in neat columns, what is an advantage of column input?
It can read missing data indicated by spaces
It can read embedded blanks
It can read character data longer than eight characters
All of the above
With column input, you cannot do which of the following?
Read data separated by spaces
Specify an informat in the INPUT statement
Read numeric data in scientific notation
All of the above
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 dollar sign
A column range
An informat
None of the above
Which of the following data values would not require an informat?
55.3E2
$2,735
09/21/1960
4,983
Which informat would be appropriate to read the value 09/03/1876?
MMDDYY8.
MMDDYY10.
DATE8.
DATE10.
Which input style is the best for reading date values from raw data?
List
Formatted
Column
All input styles can read date values
Select the INPUT statement that would be appropriate for reading data values for the variables Name, Salary, and Age in the following raw data.
INPUT Name $ Salary DOLLAR11. Age;
INPUT Name $ Salary :DOLLAR11. Age;
INPUT Name $ @10 Salary DOLLAR11. Age;
INPUT Name $ @'$' Salary Age;
Which of the following tells SAS to go to the next line when reading in data?
@
@@
/
+n
Which input style can be used with a double trailing @?
List
Column
Both can be used
Neither can be used
A record that is being held by a trailing @ will be released for which of the following reasons?
The current loop through the DATA step completes
SAS finds a subsequent INPUT statement with no line-hold specifier
Both of these
Neither of these
A record that is being held by a double trailing @ will be released for which of the following reasons?
The current loop through the DATA step completes
SAS finds a subsequent INPUT statement with no line-hold specifier
Both of these
Neither of these
