-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixotypes.prg
50 lines (40 loc) · 1.37 KB
/
fixotypes.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
CLOSE DATABASES ALL
SET EXCLUSIVE OFF
SET SAFETY OFF
PRIVATE iotyp
iotyp = 0
@04,2 SAY ""
@05,2 SAY ""
@06,2 SAY ""
@10,2 SAY "O-Types (UPD) = "
SELECT 0
USE "C:\ACS\lrc\NEWPMAST01.DBF" SHARED ALIAS new01
SELECT 0
USE "N:\Apps\Acss\pmast01.dbf" SHARED ALIAS pmt01
INDEX ON ALLTRIM(pm_part) TO l
GO TOP
DO WHILE !EOF()
SELECT pmt01
SEEK ALLTRIM(new01.pm_part)
IF FOUND()
REPLACE pmt01.pm_otype WITH new01.pm_otype
iotyp = iotyp + 1
@10,23 SAY iotyp
ENDIF
SELECT new01
SKIP
ENDDO
@13,2 SAY "The operation(s) is completed."
INKEY(5)
CLOSE DATABASES ALL
RETURN
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "600"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "500"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "400"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "300"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "200"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "100"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "101"
*!* replace all pm_desc with SUBSTR(ALLTRIM(pm_desc),4) for SUBSTR(ALLTRIM(pm_desc),1,3) = "102"
*!* replace all pm_desc with ALLTRIM(pm_desc)