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

User Databases (UDBs)
Working With Files
12–6 106160 Tandem Computers Incorporated
Guardian Processes A Guardian process is a program that is running. NCL can communicate with
Guardian processes through standard file-system data transfers. Communication can
consist of a simple one-way transfer from the originating NCL process to the
destination Guardian process, or a two-way transfer in which the originating NCL
process expects a reply from the destination Guardian process. The information
transferred because of the interprocess communication appears identical to that of
other files; there is no implicit or special data format.
NCL regards Guardian processes as entry-sequenced files. NCL can write to and read
from Guardian processes (using WRITEREAD).
User Databases
(UDBs)
Any file that NCL can process is called a user database (UDB). Accordingly,
entry-sequenced files, key-sequenced files, edit files, and Guardian processes are all
regarded as UDBs by NCL.
NonStop NET/MASTER MS and NCL processes can work with UDBs in two ways: as
single UDBs and as UDB pairs (key-sequenced files only).
Single UDBs Normally, you work with single UDBs from NonStop NET/MASTER MS. When
working with single UDBs, one UDBCTL command or FILE verb refers to one file.
UDB Pairs Sometimes you may want to work with UDB pairs from NonStop NET/MASTER MS.
A UDB pair is two key-sequenced files that are treated as a single unit in all file
processing. When working with UDB pairs, one UDBCTL command or FILE verb
refers to both files in the pair.
When You Would Work With a UDB Pair
When would you work with a UDB pair, rather than two single UDBs in an NCL
application? You would do so if all the following conditions were true:
The application deals with two key-sequenced files with certain identical physical
characteristics (described later in this section in “Creating a UDB”).
The key-sequenced files contain (or will contain) information about the same
subject.
The information in one key-sequenced file (the first file opened in the pair) can be
changed by users of the application. The first file is opened for read and write
access by the application.
The information in the other key-sequenced file (the second file opened in the
pair) must remain unchanged by users of the application. The second file is
opened for read-only access by the application.
The information in the first file is used to logically modify the information in the
second file. See “Working With Key-Sequenced Files in a UDB Pair,” later in this
section, for more information.
Consider the following example. You are writing a complex NCL application for your
installation, and you want to provide help for the users of the application. In
providing help, you have two aims: first, you do not want users to be able to modify