-
Notifications
You must be signed in to change notification settings - Fork 0
/
findcust.prg
64 lines (53 loc) · 1.14 KB
/
findcust.prg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CLOSE DATABASES ALL
SET EXCLUSIVE OFF
SET SAFETY OFF
_VFP.CAPTION = "Find Cove Ford Customers"
PRIVATE icust1, icust2
icust1 = 0
icust2 = 0
SELECT 0
USE "N:\Data_Conversions\COVE FORD\F&I\fimast.DBF" SHARED ALIAS fi01
SELECT 0
USE "N:\Data_Conversions\COVE FORD\vinmas.DBF" SHARED ALIAS svc01
INDEX ON ALLTRIM(vi_vin) TO l
SET ORDER TO l
GO TOP
@04,2 SAY ""
@05,2 SAY ""
@06,2 SAY ""
@10,2 SAY "Customer (SV1) = "
@11,2 SAY "Customer (SV2) = "
DO WHILE !EOF()
SELECT svc01
SEEK ALLTRIM(fi01.vin)
IF FOUND()
REPLACE svc01.vi_cust WITH fi01.dealnum
icust1 = icust1 + 1
@10,23 SAY icust1
ENDIF
SELECT fi01
SKIP
ENDDO
CLOSE DATABASES ALL
*!* SELECT 0
*!* USE "C:\Data_Conversion\fimast.DBF" SHARED ALIAS fi01
*!* SELECT 0
*!* USE "C:\Data_Conversion\svc2.DBF" SHARED ALIAS svc01
*!* INDEX ON ALLTRIM(vi_vin) TO l
*!* SET ORDER TO l
*!* GO TOP
*!* DO WHILE !EOF()
*!* SELECT svc01
*!* SEEK ALLTRIM(fi01.vin)
*!* IF FOUND()
*!* REPLACE svc01.vi_cust WITH fi01.dealnum
*!* icust2 = icust2 + 1
*!* @11,23 SAY icust2
*!* ENDIF
*!* SELECT fi01
*!* SKIP
*!* ENDDO
@13,2 SAY "The operation(s) is completed."
INKEY(5)
CLOSE DATABASES ALL
RETURN