basic.replace.statement Statement/BASIC Program

basic.replace.statement

Command basic.replace.statement Statement/BASIC Program
Applicable release versions: AP
Category BASIC Program (486)
Description maintains referential integrity between items that contain bi-directional bridges by eliminating duplicate item-ids.

The "item-id.new" replaces "item-id.old" in bridged-to items. "item-id.old" is deleted after replacement. In order for the data base to be consistent, there should be two-way bridges between the references.
Syntax replace file.variable,item-id.old with item-id.new
Options
Example
Assume the two files exist with the following data.  Both files contain a 
bridge to attribute 1 of the other file.

  FN1           FN2

ID  Attr1    ID  Attr1
---------    ---------
b     1      1    b
c     2      2    c
d     3      3    d

Now assume the following FlashBASIC or Pick/BASIC program is run:

open "fn1" to f1
replace f1,"b" with "c"

Now, the files contain the following data:

  FN1           FN2

ID  Attr1    ID  Attr1
---------    ---------
c     1]2    1    c
d     3      2    c
             3    d
Purpose
Related basic.statements
basic.replace
pc.b