楼主: hongjino
2934 2

问下如何同时在一个数据步中打开两个数据集而都能读完?? [推广有奖]

  • 0关注
  • 0粉丝

学前班

10%

还不是VIP/贵宾

-

威望
0
论坛币
2 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
30 点
帖子
1
精华
0
在线时间
1 小时
注册时间
2009-8-1
最后登录
2011-8-11

楼主
hongjino 发表于 2010-8-17 12:20:45 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
data m;
         
             set m1  ;
                     do until (last);
              set m2 end = last;
           if newv5 = v5 and newv6 = v6 then output;
          end;
      
run;

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

扫码加我 拉你入群

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

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

关键词:数据集 output until outpu Last 数据集

沙发
pobel 在职认证  发表于 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;
和谐拯救危机

藤椅
bobguy 发表于 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

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 00:38