全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
902 1
2020-08-09
proc sort data=test5;by stkcd descending year;run;
data test6;set test5;by stkcd;
retain m n o p q;
if not (first.stkcd) then soe=coalesce(soe,m);
if not (first.stkcd) then central_soe=coalesce(central_soe,n);
if not (first.stkcd) then provincial_soe=coalesce(provincial_soe,o);
if not (first.stkcd) then city_below_soe=coalesce(city_below_soe,p);
if not (first.stkcd) then other_soe=coalesce(other_soe,q);

m=soe;
n=central_soe;
o=provincial_soe;
p=city_below_soe;
q=other_soe;

drop m n o p q;
run;


二维码

扫码加我 拉你入群

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

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

全部回复
2020-8-10 22:10:37
显然,是对列一系列元素执行相同的程序。建议使用数组:
复制代码
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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