hongjino 发表于 2010-8-17 12:20 
data m;
set m1 ;
do until (last);
set m2 end = last;
if newv5 = v5 and newv6 = v6 then output;
end;
run;
上面的程序为什么m1里面的观测只读一次???
求指点。bow!
The set, merge etc. statement can open many data sets.
How do you know it 只读一次?
The following log says two observation have beed read in.
161 data m1 m2;
162 x=1;output;
163 x=1;output;
164 run;
NOTE: The data set WORK.M1 has 2 observations and 1 variables.
NOTE: The data set WORK.M2 has 2 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
165
166 data m;
167 set m1 ;
168 do until (last);
169 set m2 end = last;
170 *if newv5 = v5 and newv6 = v6 then output;
171 end;
172
173 run;
NOTE: There were 2 observations read from the data set WORK.M1.
NOTE: There were 2 observations read from the data set WORK.M2.
NOTE: The data set WORK.M has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds