楼主: vieri32
1234 2

CALL EXECUTE 一問 [推广有奖]

  • 1关注
  • 0粉丝

硕士生

22%

还不是VIP/贵宾

-

威望
0
论坛币
7 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1062 点
帖子
88
精华
0
在线时间
110 小时
注册时间
2009-12-6
最后登录
2021-7-12

楼主
vieri32 发表于 2013-3-31 19:56:24 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我用call execute 運行一個macro, macro里用用proc sql select into產生一個Macro variable, 但這個macro variables 好像得不出值來.
請問這是什麼原因...非常感謝.

以下紅字的地方好像根本不起作用..求解釋!!!
如果我運行%allfuture(productA); %allfuture(productB); %allfuture(productC); 程序是沒問題可以運行的.

程序如下:

%macro Allfuture(name);

proc sort data=o.&name. out=future.&name; by date; run;

proc contents data=future.&name. out=temp.var  noprint;
run;

proc sql  noprint;
select distinct name into :V  separated by " " from temp.var where name not like '%VAR%' and name not in ( "Date");
quit;

%put &V.;

proc transpose data=future.&name out=future.&name.2 (rename=col1=price) name=contract;
by date;
var &V.;
run;

data future.&name.2;
set  future.&name.2;
format product $12.;
product="&name.";
run;

proc append base=future.FutureAll data=future.&name.2;run;

%mend;

data _null_;
set temp.products;
call execute('%Allfuture('||product||')');
run;

二维码

扫码加我 拉你入群

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

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

关键词:EXECUTE call Cute cut EXE contents future 程序

沙发
pobel 在职认证  发表于 2013-3-31 21:35:56
data _null_;
set temp.products;
call execute('%nrstr(%Allfuture('||product||'))');
run;
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
a6566792 + 1 + 1 + 1 热心帮助其他会员

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

和谐拯救危机

藤椅
vieri32 发表于 2013-3-31 23:53:32
pobel 发表于 2013-3-31 21:35
data _null_;
set temp.products;
call execute('%nrstr(%Allfuture('||product||'))');
It works!!!!! many thanks!

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

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