use 外匯匯率
scan all
scatter memvar
select 外幣代碼 from 外匯代碼 where 外幣名稱=m.幣種1 into array dm
m.幣種1代碼 = dm(1)
select 外幣代碼 from 外匯代碼 where 外幣名稱=m.幣種2 into array dm
m.幣種2代碼 = dm(1)
insert into rate from memvar
select 外匯匯率
endscan