SET DEFAULT TO d:\deljeno
SET EXCLUSIVE OFF
SET DELETED ON
OPEN DATABASE d:\zoovet\baze\str
USE vipkup ALIAS vipkup shared in 0


OPEN DATABASE d:\deljeno\zajednicka SHARED
USE vipkup ALIAS jvip SHARED IN 0

SET DEVICE TO printer
SET PRINTER TO a.lst

SELECT vipkup
GOTO top
DO WHILE !EOF()
a1=vipkup.barkod
a2=vipkup.ime
a3=vipkup.prezime
a4=vipkup.jmbg


SELECT jvip
SET ORDER TO tag barkod
GOTO top
SEEK a1
IF FOUND()
	IF a2<>jvip.ime OR a3<>jvip.prezime OR a4<>jvip.jmbg
	@PROW()+1,1 say a1+"vip   "+STR(vipkup.rabat,8,2)+"jvip   "+STR(jvip.rabat,8,2)
	ENDIF
ENDIF
SELECT vipkup
SKIP
enddo	
SET PRINTER to	
SET DEVICE TO  SCREEN 


