0

我对下面的 SAS 代码有疑问。我是数组的新手,下面的代码到底在做什么。我的理解是下面有两个索引。我相信这是对两个索引的 SAS 数据集进行重复数据删除。我不太确定。谢谢你的帮助!

data unix.txn_match_part_four_01;
set unix.txn_match_part_four_00;
format id_one1-id_one95000 BEST12. id_two1-id_two95000 BEST12.;

array id_one{95000} id_one1-id_one95000;
array id_two{95000} id_two1-id_two95000;

retain id_one1-id_one95000;
retain id_two1-id_two95000;

if _n_ = 1 then i = 1;
else i + 1;

do j = 1 to i;
if clm_idx = id_one{j} then delete;
end;

do k = 1 to i;
if txn_idx = id_two{k} then delete;
end;

id_one{i}=clm_idx;
id_two{i}=txn_idx;

run;
4

0 回答 0