全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3839 7
2014-10-29
悬赏 10 个论坛币 已解决

%macro calrowcol(dat=);

%let dsid=%sysfunc(open(&dat));  

%let row=%sysfunc(attrn(&dsid,nobs));
%let col=%sysfunc(attrn(&dsid,nvars));

%let rc=%sysfunc(close(&dat));

%put rownum=&row;
%put colnum=&col;


%mend;


最佳答案

pobel 查看完整内容

To recover from this error, you must submit the following: '); %mend; If the above methods do not work, try submitting the following string: *'; *"; *); */; %mend; run; Continue submitting this string until the following message appears in the SAS log: ERROR: No matching %MACRO statement for this %MEND statement.
二维码

扫码加我 拉你入群

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

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

全部回复
2014-10-29 15:10:20
To recover from this error, you must submit the following:

');
%mend;

If the above methods do not work, try submitting the following string:

*'; *"; *); */; %mend; run;

Continue submitting this string until the following message appears in the SAS log:

ERROR: No matching %MACRO statement for this %MEND statement.
二维码

扫码加我 拉你入群

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

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

2014-10-29 15:14:35
%let rc=%sysfunc(close(&dsid));
二维码

扫码加我 拉你入群

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

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

2014-10-29 15:17:31
pobel 发表于 2014-10-29 15:14
%let rc=%sysfunc(close(&dsid));
5457
5458   %macro calrowcol(dat=);
5459
5460   %let dsid=%sysfunc(open(&dat));
5461
5462   %let row=%sysfunc(attrn(&dsid,nobs));
ERROR: 检测到开型代码语句的递归。
5463   %let col=%sysfunc(attrn(&dsid,nvars));
ERROR: 检测到开型代码语句的递归。
5464
5465   %let rc=%sysfunc(close(&dsid));
ERROR: 检测到开型代码语句的递归。
5466
5467   %put rownum=&row;
ERROR: 检测到开型代码语句的递归。
5468   %put colnum=&col;
ERROR: 检测到开型代码语句的递归。
5469
5470
5471   %mend;
ERROR: 宏关键字 MEND 显示为文本。可能缺失分号或其他分隔符。
二维码

扫码加我 拉你入群

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

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

2014-10-29 15:28:34
pobel 发表于 2014-10-29 15:14
%let rc=%sysfunc(close(&dsid));
程序执行中可能出现了其他问题   
二维码

扫码加我 拉你入群

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

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

2014-10-29 15:34:08
小鳄鱼a 发表于 2014-10-29 15:17
5457
5458   %macro calrowcol(dat=);
5459
宏定义的右括号是中文的……。
请注意观察,看到不一样的地方了吗?
复制代码
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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