全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
5867 7
2015-11-24
data a(replace=yes);
title=2;
if title=1 then Division=2;
else if title=2 then Division=35121;
put title= division=;
run;
此程序运行正确,但下面的程序:
data a(replace=yes);
input receipts;
total+ receipts;
datalines;
10
23
20
15
;
run;
put receipts=;
run;

给出错误提示:
118  put receipts=;
     ---
     180

ERROR 180-322: 语句无效或未按正确顺序使用。

请教各位达人,为什么会出错啊?谢谢了!

二维码

扫码加我 拉你入群

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

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

全部回复
2015-11-24 10:08:59
这样就可以了,data a(replace=yes);
input receipts  ;
  total + receipts;
   put receipts=;
datalines;
10
23
20
15
;
run;
二维码

扫码加我 拉你入群

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

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

2015-11-24 10:09:59
在data步,数据应该放到最下面,不应该放到命令中间
二维码

扫码加我 拉你入群

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

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

2015-11-24 10:11:31
复制代码
二维码

扫码加我 拉你入群

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

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

2015-11-24 11:17:14
total+ receipts; 在程序中是如何执行的呢?
二维码

扫码加我 拉你入群

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

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

2015-11-24 14:28:31
无花留香 发表于 2015-11-24 11:17
total+ receipts; 在程序中是如何执行的呢?
其实是累加,并且将total的值带入下一步
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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