ttracy_w 发表于 2010-8-18 09:52 
语句是什么?
例如:input id vwm ewm r1-r10;
只想对前五十条数据或者后五十条记录进行分析
谢谢
There a couple ways for 前五十条数据.
1) use firstobs option of infile statement
2) construct a count and when count reaches 50 then stop
148 data t1;
149 infile 'C:\temp\test.txt' firstobs=3;
150 input;
151 cnt=1;
152 if cnt=3 then stop;
153 run;
NOTE: The infile 'C:\temp\test.txt' is:
Filename=C:\temp\test.txt,
RECFM=V,LRECL=256,File Size (bytes)=15,
Last Modified=20Aug2010:22:42:08,
Create Time=20Aug2010:22:42:08
NOTE: 3 records were read from the infile 'C:\temp\test.txt'.
The minimum record length was 1.
The maximum record length was 1.
NOTE: The data set WORK.T1 has 3 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
154
155 data t1;
156 infile 'C:\temp\test.txt' ;
157 input;
158 cnt+1;
159 if cnt=4 then stop;
160 run;
NOTE: The infile 'C:\temp\test.txt' is:
Filename=C:\temp\test.txt,
RECFM=V,LRECL=256,File Size (bytes)=15,
Last Modified=20Aug2010:22:42:08,
Create Time=20Aug2010:22:42:08
NOTE: 4 records were read from the infile 'C:\temp\test.txt'.
The minimum record length was 1.
The maximum record length was 1.
NOTE: The data set WORK.T1 has 3 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds