实际上,你写的最后两个陈述确实有用。您是否收到错误或意外结果?你能举一个简单的例子来说明这个问题吗?
请注意,要使其工作,关键是
temp_match_fl(jj)
是1、2或3,因为OCS\u数组有三个元素。从您展示的代码来看,不清楚这是否总是正确的。不显示匹配标志数组。
data want ;
array temp_match_fl(3) temp_match_fl1 - temp_match_fl3 (1 2 3) ;
array buracc_repay(3) buracc_repay1 - buracc_repay3 (10 20 30) ;
array ocs_repay(3) ocs_repay1 - ocs_repay3 (100 200 300) ;
jj=1 ;
kk=2 ;
*buracc_repay(jj) = ocs_repay(kk); *this works ;
put temp_match_fl(jj)= ; *debug to confirm value is 1 2 or 3 ;
buracc_repay(jj) = ocs_repay(temp_match_fl(jj)); *this also works;
put (buracc_repay:)(=) temp_match_fl1=; *check output ;
run ;