SET DELETED ON

OPEN DATABASE d:\sasa\baze\str 
USE kalkstav ALIAS kalkstav IN 0
USE roba ALIAS roba IN 0

USE d:\sasa\podaci\kalkstav ALIAS kstav IN 0
USE d:\sasa\podaci\roba ALIAS kroba IN 0

SELECT kroba
GOTO top
DO WHILE !EOF()
a1=kroba.sifrob
SELECT roba
SET ORDER TO tag sifrob
GOTO top
SEEK a1
IF !FOUND()
	SELECT kroba
	SCATTER memvar
	SELECT roba
	=CURSORSETPROP("AutoIncError", .F. , "roba" )
	APPEND BLANK
	GATHER memvar
	?a1
ENDIF
SELECT kroba
SKIP
ENDDO
	
