
131Data Input and Output
byage, number of people in the household, and the number of children in
the household. Program 8.3 reads the CH8_3.TXT le by using the list input
method.
CH8_3.txt:
123456789012345678901234567890
James Miller 26 3 1
Patricia Davis 30 4 1
John Jackson 31 2 0
Mary Martinez 32 4 2
Program 8.3:
data ex8_3;
infile "W:\SAS_Book\dat\ch8_3.txt";
input fname $
lname $
age
family
children;
run;
title 'Using the list input method';
proc print data = ex8_3;
run;
Output from Program 8.3:
Using the list input method
Obs fname lname age family children
1 James Miller 26 3 1
2 Patricia Davis 30 4 1
3 John Jackson 31 2 0
4 ...