qtyin.dbf item qtyin A 10 B 10 C 10 qtyout.dbf item qtyout A 5 D 5 totqty.dbf item qtyin qtyout A 10 5 B 10 0 C 10 0 D 0 5