NET/MASTER Network Control Language (NCL) Programmer's Guide
User Databases (UDBs)
Working With Files
106160 Tandem Computers Incorporated 12–7
the file containing the help information you distribute with the application; second,
you want users to be able to customize the help information. You can achieve these
aims by providing two key-sequenced files with the NCL application, and by opening
the files as a UDB pair.
Assume that the application has a FIND command, and that the read-only help file in
the UDB pair states:
The FIND command finds a record that matches the specified criteria. You type
the FIND command at the command input line.
Suppose that a user, through trial and error, discovers that the F5 function key is also
used to execute the FIND command. The user can change the help information to:
The FIND command finds a record that matches the specified criteria. You can
execute the FIND command by typing it at the command input line or by pressing
the F5 function key.
The new help information is added to the file opened for read and write access in the
UDB pair. The read-only file is unchanged. However, users who require help
information on the FIND command obtain the changed help information, which has
logically modified the original help information.
Why You Would Work With a UDB Pair
Why would you work with a UDB pair, rather than two single UDBs in an NCL
application? You would do so for three main reasons:
To improve the performance of the application
To simplify the coding of the application
To automatically ensure information integrity
Performance is improved because you can control access to the two files in the UDB
pair by using a single UDBCTL command or FILE verb, rather than two commands or
verbs. When using UDB pairs, the number of commands or verbs is reduced.
Coding is simplified because you do not have to deal with two separate files: the files
are treated as a single unit in all file processing. This reduces the number of NCL
statements required to perform file operations, to check return codes, and so on.
Information integrity is automatically ensured because the UDBCTL OPEN command
always opens the second file in a UDB pair for read-only access. Customized
information in the first file logically modifies the information you distribute in the
second file.