NET/MASTER Network Control Language (NCL) Programmer's Guide
Working With KeySequenced Files in a UDB Pair
Working With Files
106160 Tandem Computers Incorporated 12–83
When updating a record in a UDB pair, the FILE PUT verb operates as follows:
If the record is in neither file, the record is added to the first file. This FILE PUT
operation is the same as a FILE ADD operation (see Figure 12-18).
If the record is in the first file but not the second file, the record in the first file is
updated (see Figure 12-20). That is, a new record replaces the existing record in
the first file.
If the record is in the second file but not the first file, the record is added to the
first file (see Figure 12-21). That is, the new record in the first file logically updates
the record in the second file. This is so because the record in the first file "hides"
the record in the second file. Subsequent file processing works with the record
from the first file.
If the record is in both files, the record in the first file is updated (see Figure 12-22).
That is, a new record replaces the existing record in the first file.
Figure 12-20. Updating a Record in a UDB Pair—Case 1
Before FILE PUT Verb.
B
C
G
File 1
1
File 2
2
File 1 has read and write access.
1 2
File 2 has read-only access.
After FILE PUT Verb.
B
C
G
File 1
1
File 2
FILE PUT KEY=A MDO=&rec.
A
New Record A
Replaces Existing
Record A.
047
Legend
2
A