全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学
2602 7
2009-12-03
在跑SAS程序时,
没报错,但是数据集为空,
自己觉得是下面这个程序有点问题,(a.model=b.model)这个匹配的时候,a数据集是大写的MODEL&i,b数据集是小写model&i,求助是不是这个问题,应该怎么处理?
谢谢~~

data ffev;
  set _null_;
run;
%macro ffev;
%do i=1 %to 9;
proc sql;
  create table ffev_temp as
  select a.*
  from ffev_&i a inner join modsel b
  on (a.permno=b.permno) and (a.model=b.model);
quit;
data ffev;
  set ffev ffev_temp;
run;
%end;
%mend;
%ffev;
附件列表

data.rar

大小:135.45 KB

 马上下载

附上数据

本附件包括:

  • modsel.sas7bdat
  • ffev_1.sas7bdat
  • ffev_2.sas7bdat
  • ffev_3.sas7bdat
  • ffev_4.sas7bdat
  • ffev_5.sas7bdat
  • ffev_6.sas7bdat
  • ffev_7.sas7bdat
  • ffev_8.sas7bdat
  • ffev_9.sas7bdat

二维码

扫码加我 拉你入群

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

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

全部回复
2009-12-3 21:24:54
from ffev_&i a inner join modsel b
里面的modsel 和b什么关系  是不是少一个点啊
二维码

扫码加我 拉你入群

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

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

2009-12-3 22:02:37
a数据集是大写的MODEL&i,b数据集是小写model&i,
The variable name was 'model1', 'model2' or so in the above writting while you used a.model=b.model, the variable name as 'model', in the code.
But I am not sure if that is the problem since it is very obvious.


Additionally, if data set 'ffev' was not defined prior to the macro, that could be an error. However, as you said, there was no errors in the log.

That is so far what I can see from the code.
二维码

扫码加我 拉你入群

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

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

2009-12-3 22:13:31
try, modify 'on' clause as below one,
compress(a.permno)=compress(b.permno) and compress(a.model)=compress(b.model);
二维码

扫码加我 拉你入群

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

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

2009-12-3 22:40:24
huage 发表于 2009-12-3 22:13
try, modify 'on' clause as below one,
compress(a.permno)=compress(b.permno) and compress(a.model)=compress(b.model);
ERROR: 函数 COMPRESS 要求字符表达式作为参数 1。
ERROR: 函数 COMPRESS 要求字符表达式作为参数 1。
这样报错~~
二维码

扫码加我 拉你入群

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

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

2009-12-3 22:41:58
jingju11 发表于 2009-12-3 22:02
a数据集是大写的MODEL&i,b数据集是小写model&i,
The variable name was 'model1', 'model2' or so in the above writting while you used a.model=b.model, the variable name as 'model', in the code.
But I am not sure if that is the problem since it is very obvious.


Additionally, if data set 'ffev' was not defined prior to the macro, that could be an error. However, as you said, there was no errors in the log.

That is so far what I can see from the code.
我前面有定义的
data ffev;
  set _null_;
run;
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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