Select the best answer
for each question. Check your answers using the answer key in the
appendix.
-
Which SAS statement
correctly uses column input to read the values in the raw data file
below in this order: Address (fourth field), SquareFeet (second field),
Style (first field), Bedrooms (third field)?
-
input Address 15-29 SquareFeet 8-11 Style 1-6
Bedrooms 13;
-
input $ 15-29 Address 8-11 SquareFeet $ 1-6 Style
13 Bedrooms;
-
input Address $ 15-29 SquareFeet 8-11 Style $ 1-6
Bedrooms 13;
-
input Address 15-29 $ SquareFeet 8-11 Style 1-6
$ Bedrooms 13;
-
Which is not an advantage
of column input?
-
It can be used to read
character variables that contain embedded blanks.
-
No placeholder is required
for missing data.
-
Standard as well as
nonstandard data values can be read.
-
Fields do not have to
be separated by blanks or other delimiters.
-
Which is an example
of standard numeric data?
-
Formatted input can
be used to read which of the following?
-
standard free-format
data
-
standard data in fixed
fields
-
nonstandard data in
fixed fields
-
both standard and nonstandard
data in fixed fields
-
Which informat should
you use to read the values in columns 1-5?
-
The COMMAw.d informat
can be used to read which of the following values?
-
Which INPUT statement
correctly reads the values for ModelNumber (first field) after the
values for Item (second field)? Both Item and ModelNumber are character
variables.
-
input +7 Item $9. @1 ModelNumber $5.;
-
input +6 Item $9. @1 ModelNumber $5.;
-
input @7 Item $9. +1 ModelNumber $5.;
-
input @7 Item $9 @1 ModelNumber 5.;
-
Which INPUT statement
correctly reads the numeric values for Cost (third field)?
-
Which SAS statement
correctly uses formatted input to read the values in this order: Item
(first field), UnitCost (second field), Quantity (third field)?
-
input @1 Item $9. +1 UnitCost comma6.
@18 Quantity 3.;
-
input Item $9. @11 UnitCost comma6.
@18 Quantity 3.;
-
input Item $9. +1 UnitCost comma6.
@18 Quantity 3.;
-
-
Which raw data file
requires the PAD option in the INFILE statement in order to correctly
read the data using either column input or formatted input?