OPEN DATABASE \\ATHLON64\D\BELCAR\BAZE\BELCAR SHARED
USE D:\A\PROBA ALIAS PROBA SHARED IN 0
USE \\ATHLON64\D\BELCAR\BAZE\KUPDOB ALIAS KUPDOB SHARED IN 0
SELECT KUPDOB
SET ORDER TO TAG KUPDOB
GOTO TOP
SELECT PROBA
GOTO TOP
DO WHILE !EOF()
A1=PROBA.KSIFRA
A2=PROBA.RSIFRA
M.RAD=SPACE(4)
IF ALLTRIM(UPPER(VLADA))="X"
	M.RAD="0006"
ENDIF
IF ALLTRIM(UPPER(BRANKO))="X"
	M.RAD="0007"
ENDIF
IF EMPTY(M.RAD)
	SKIP
	LOOP
ENDIF

SELECT KUPDOB
SEEK ALLTRIM(A1)
IF FOUND()
	REPLACE KUPDOB.RADNIK WITH M.RAD
ELSE
	?A1
ENDIF
GOTO TOP
SEEK ALLTRIM(A2)
IF FOUND()
	REPLACE KUPDOB.RADNIK WITH M.RAD
ELSE
	?A1
ENDIF
SELECT PROBA
SKIP
ENDDO
		 
