Creating a Single Observation from Multiple Records | |
Reading Multiple Records in Sequential
Order |
Using The / Line Pointer Control
Take a closer look at using the forward slash (/) line pointer control in the following example.
The raw data file Memdata contains the mailing list of a
professional organization. Your task is to combine the information for each
member into one data set observation. We'll begin by reading each member's
name, followed by the street address, and finally the city, state, and zip
code.
|
data perm.members; infile memdata; input Fname $ Lname $ |
|
|
data perm.members; infile memdata; input Fname $ Lname $ /
|
|
|
data perm.members; infile memdata; input Fname $ Lname $ / Address $ 1-20 / |
|
|
data perm.members; infile memdata; input Fname $ Lname $ / Address $ 1-20 / City & $10. State $ Zip $; run; |
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.