全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2855 2
2010-08-17
data m;
         
             set m1  ;
                     do until (last);
              set m2 end = last;
           if newv5 = v5 and newv6 = v6 then output;
          end;
      
run;

上面的程序为什么m1里面的观测只读一次???
求指点。bow!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-8-17 12:26:59
data m;
         
             set m1  ;
                     do i=1 to nobs;
              set m2 nobs=nobs point=i;
           if newv5 = v5 and newv6 = v6 then output;
          end;
      
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-8-21 11:02:29
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
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群