Lucky 2.3 1.9 . 3.0
Spot 4.6 2.5 3.1 .5
Tubs 7.1 . . 3.8
Hop 4.5 3.2 1.9 2.6
Noisy 3.8 1.3 1.8
1.5
Winner 5.7 . . .
这个数据在记事本或是word里面存为 ccc.DAT文件,
然后运行下面程序
* Create a SAS data set named toads;
* Read the data file ToadJump.dat using list input;
DATA toads;
INFILE ’C:\Program Files\SAS\ccc.DAT’;
INPUT ToadName $ Weight Jump1 Jump2 Jump3;
* Print the data to make sure the file was read correctly;
PROC PRINT DATA = toads;
TITLE ’SAS Data Set Toads’;
RUN;
结果是:
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) 9.1 (TS1M3)
Licensed to UNIVERSITY OF ILLINOIS AT CHICAGO-CAMPUSWIDE-T/R, Site 0016365003.
NOTE: This session is executing on the XP_PRO platform.
NOTE: SAS initialization used:
real time 1.15 seconds
cpu time 0.71 seconds
1 * Create a SAS data set named toads;
2 * Read the data file ToadJump.dat using list input;
3 DATA toads;
4 INFILE 扖:\Program Files\SAS\ccc.dat?
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.
ERROR 76-322: Syntax error, statement will be ignored.
5 INPUT ToadName $ Weight Jump1 Jump2 Jump3;
6 run;
ERROR: No DATALINES or INFILE statement.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TOADS may be incomplete. When this step was stopped there were 0
observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
不知道是什么地方出错了 希望大家帮忙看看