-
Notifications
You must be signed in to change notification settings - Fork 0
/
addsalesman2.prg
167 lines (145 loc) · 2.86 KB
/
addsalesman2.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
CLOSE DATABASES ALL
SET SAFETY OFF
SET EXCLUSIVE OFF
PRIVATE isale
isale = 0
@04,2 SAY ""
@05,2 SAY ""
@06,2 SAY ""
@10,2 SAY "Salesman (438) = "
@11,2 SAY "Salesman (445) = "
@12,2 SAY "Salesman (471) = "
@13,2 SAY "Salesman (490) = "
@14,2 SAY "Salesman (405) = "
@15,2 SAY "Salesman (412) = "
@16,2 SAY "Salesman (462) = "
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000438"
isale = isale + 1
@10,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000445"
isale = isale + 1
@11,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000471"
isale = isale + 1
@12,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000490"
isale = isale + 1
@13,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000405"
isale = isale + 1
@14,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000412"
isale = isale + 1
@15,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
CLOSE DATABASES ALL
SELECT 0
USE "N:\APPS\acss\vinmas.dbf" SHARED ALIAS vin01
SET FILTER TO vi_comp = "02" .AND. EMPTY(vi_slsm) .AND. vi_vstt = "S"
INDEX ON ALLTRIM(vi_vin) TO l
GO TOP
DO WHILE !EOF()
SELECT vin01
REPLACE vin01.vi_slsm WITH "000462"
isale = isale + 1
@16,23 SAY isale
IF isale = 1338
isale = 0
EXIT
ENDIF
SELECT vin01
SKIP
ENDDO
@18,2 SAY "The operation(s) is completed."
INKEY(5)
CLOSE DATABASES ALL
RETURN