data new_data_set;
if _n_=1 then set summary_data_set;
set original_data_set;
假设原始数据original_data_set为:
1 ...
2 ...
2 ...
3 ...
3 ...
合并的数据summary_data_set为:total
则结果new_data_set为:
1 ... total
2 ... total
2 ... total
3 ... total
3 ... total
虽然已经知道运行结果,但没有想明白程序的运行原理,书上的解释说因为set语句是自动保留的,summary_data_set只在第一次循环时读入了一次,有其他变量时自动保留了,类似于retain语句,新手实在没看明白,求各位大神指点,谢谢!!!



雷达卡





京公网安备 11010802022788号







