I have two databases (A) (B) that should have the same data in each record. The fields are in order by account number and position number. However, I need to verify on occasion that each contains the same records. I’m attempting to write a short program that uses two fields to verify. If the two fields match in the same record, I want the program to write the position number from (A) to a new field in database (B). However if one of the two field records doesn’t match, I want to place an X in a new field called missing in (A) by that record. This is what I’ve done so far, the IF Found works but the else REPLACE doesn’t. Can anyone assist me? Thanks in advance.
SELECT B
SCAN
SELECT A
LOCATE FOR A.ACCT = B.ACCT AND A.POS = B.POS
IF FOUND()
REPLACE B.CHECK WITH A.POS
ELSE
REPLACE A.MISSING WITH "X"
ENDIF
SELECT LAW07
SELECT B
SCAN
SELECT A
LOCATE FOR A.ACCT = B.ACCT AND A.POS = B.POS
IF FOUND()
REPLACE B.CHECK WITH A.POS
ELSE
REPLACE A.MISSING WITH "X"
ENDIF
SELECT LAW07