Technical data

5.11 Realms
A realm is a group of one or more areas. Realms are logical divisions of the
database. A realm is the object of the DML READY statement. Figure 5–27
shows the relationship between the schema, areas, subschema, and realms. Even
though realms can contain data from more than one area, the type of data they
contain is dependent on the subschema. It acts as a filter, allowing access to only
specific data items.
Entire realms, as well as individual database records, are locked by the DBCS
as they are retrieved by the run unit, and the degree of locking depends on the
specific DML command used. For more information, see Section 6.1.
Figure 5–27 Database Relationships
MARKET
MARKETS
ZK−1504−GE
SCHEMA FOR THE PARTS DATABASE
AREAS REALMS
SUBSCHEMA FOR ACCESS TO THE PARTS DATABASE
BUYPERSONNEL
PERSONNEL
5.12 Run Unit
The term run unit and program are not the same. A run unit is an executable
image that may access a database, while a program can be used in two or more
run units. For example, program SHOW-EMPLOYEE can be run simultaneously
by a payroll department employee to obtain employee data, and by an accountant
to obtain job cost data. Each person controls his or her own run unit.
5.13 Currency Indicators
When you access database records, the database control system (DBCS) uses
pointers called currency indicators to keep track of record storage and retrieval.
HP COBOL uses currency indicators to remember records and their positions in
the database. Currency indicators can be changed by DML statement execution.
Thus, they assist in defining the environment of a DML statement and are
updated as a result of executing DML statements.
Database Programming with HP COBOL 5–25