pobel 发表于 2012-11-13 17:29
是不是这样?
65 data test;
66 y=1000;
67 array x[200] x1-x200;
68 do _n_=1 to 200;
69 x(_n_)=_n_;
70 end;
71 run;
NOTE: The data set WORK.TEST has 1 observations and 201 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
72
73 data test1;
74 set test;
75 array x(200);
76 array nn(19900) ;
77 do i=1 to 199;
78 do j=i+1 to 200;
79 num+1;
80 nn(num)=(x(i)-x(j))/(x(i)+x(j));
81 end;
82 end;
83 keep y nn:;
--
241
ERROR 241-185: The array nn is not allowed in a DROP/KEEP/RENAME context.
84 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST1 may be incomplete. When this step was stopped there were 0
observations and 19901 variables.
WARNING: Data set WORK.TEST1 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.04 seconds
数据未能读入进去。。如上所示: there were 0
observations and 19901 variables.