NET/MASTER Network Control Language (NCL) Programmer's Guide

Working With KeySequenced Files in a UDB Pair
Working With Files
12–80 106160 Tandem Computers Incorporated
Adding a Record The FILE ADD and FILE PUT verbs add a new record to a UDB pair. You can use
either verb to add records to mapped, unmapped, and delimited key-sequenced files
in a UDB pair.
Note See the discussion on adding a record to an entry-sequenced file, earlier in this section, for information on
how to construct a record before adding the record to a file. See the discussion on adding a record to a
single key-sequenced file, earlier in this section, for information on how to specify the record key before
adding the record to a file.
The FILE ADD and FILE PUT verbs attempt to add the record as a new record in the
first file in the UDB pair. If the specified record key does not exist in either file, the
record is added to the first file; otherwise, the FILE ADD operation fails. (The FILE
PUT verb, however, succeeds in updating the record, as described later in this section.)
Figure 12-18 shows how to add a record to a UDB pair.
Figure 12-18. Adding a Record to a UDB Pair
Before FILE ADD 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 ADD Verb.
B
C
G
File 1
1
File 2
FILE ADD KEY=A MDO=&rec.
A
Record A Added.
045
Legend
2