CLOSE DATABASES
CLOSE TABLES
SET DELETED ON
SET DATE GERMAN
SET CENTURY on

SET DEFAULT TO d:\2024\baze

USE zagfak ALIAS zagfak SHARED IN 0
USE fakstav ALIAS fakstav SHARED IN 0
SELECT fakstav
GOTO top
DO WHILE !EOF()
a1=fakstav.brdok
a2=fakstav.magacin
SCATTER memvar
SELECT zagfak
SET ORDER TO tag magbrdok
GOTO top
SEEK a2+a1
IF !FOUND()
	APPEND BLANK
	replace zagfak.magacin 	WITH a2
	replace zagfak.brdok	WITH a1
ENDIF
SELECT fakstav
SKIP
ENDDO
RETURN
