... do while found() replace d1 with dd enddoThere is nothing to change the condition, found(), which only tells you whether the last seek() or locate was successful. Therefore, the loop will run without end.
>SELECT vou_sum >GO top >DO while !eof() > AA=date && date type > bb=VOU_NO && numueric type > cc=ALLTRIM(VOU_TYPE)&& character type > dd=d1 > > SELECT VOUCHERS > LOCATE for date=AA and VOU_NO=bb and VOU_TYPE=cc > DO while FOUND() > REPLACE d1 WITH dd > ENDDO > > SELECT vou_sum > Skip >ENDDO >