Quiz:
Creating
a Single Observation from Multiple Records
Select the best answer for each question and click Score My Quiz.
- You can position the input pointer
on a specific record using
- Which pointer control is used to
read multiple records in sequential order?
- Which pointer control can be used
to read records in any order?
- Which SAS statement correctly reads
the values for
FirstName , LastName , Address ,
City , State , and Zip in order?
1---+----10---+----20--- |
LAWRENCE CALDWELL |
1010 LAKE STREET |
ANAHEIM CA 94122 |
RACHEL CHEVONT |
3719 OLIVE VIEW ROAD |
HARTFORD CT 06183 |
- Which INPUT statement correctly
reads the values for
PatientID in the fourth record,
then returns to the first record to read the values for FirstName
and LastName ?
1---+----10---+----20--- |
GEORGE CHESSON |
3801 WOODSIDE COURT |
GARNER NC 27529 |
XM065 FLOYD |
JAMES COLDWELL |
123-A TARBERT |
APEX NC 27529 |
XMO65 LAWSON |
- How many records will be read
for each execution of the DATA step?
1---+----10---+----20--- |
SKIRT BLACK |
COTTON |
036499 $44.98 |
SKIRT NAVY |
LINEN |
036899 $51.50 |
DRESS RED |
SILK |
037299 $76.98 |
data spring.sportswear;
infile newitems;
input #1 Item $ color $
#3 @8 Price comma6.
#2 Fabric $
#3 SKU $ 1-6;
run;
- Which INPUT statement correctly
reads the values for
City , State , and Zip ?
1---+----10---+----20--- |
DINA
FIELDS |
904
MAPLE CIRCLE |
DURHAM
NC 27713 |
ELIZABETH
GARRISON |
1293
OAK AVENUE |
CHAPEL
HILL
NC 27614 |
DAVID
HARRINGTON |
2426
ELMWOOD LANE
|
RALEIGH
NC 27803 |
- Which program does not
read the values in the first record as a variable named
Item
and the values in the second record as two variables named Inventory
and Type ?
1---+----10---+----20--- |
COLORED PENCILS |
12 BOXES |
WATERCOLOR PAINT |
8 PALETTES |
DRAWING PAPER |
15 PADS |
- Which INPUT statement reads the
values for
LastName, FirstName, Department
and Salary (in that order)?
1---+----10---+----20--- |
ABRAMS THOMAS |
SALES $25,209.03 |
BARCLAY ROBERT |
MARKETING $29,180.36 |
COURTNEY MARK |
PUBLICATIONS $24,006.16 |
- Which raw data file poses potential
problems when you are reading multiple records for each observation?
|