Technical data

Entries that begin with level-numbers are called data description entries. The
level-number values are 01 to 49, 66, 77, and 88. Level-numbers 01 to 09 can be
represented as one- or two-digit numbers.
Level 01 and 77 data description entries begin in Area A. All other data
description entries can begin anywhere to the right of Margin A. Indentation has
no effect on level-number magnitude; it merely enhances readability.
1.2 HP COBOL Data Manipulation Language (DML)
The HP COBOL data manipulation language (DML) is a programming language
extension that provides a way for a COBOL application program to access
a database. An HP COBOL database application program contains DML
statements that tell the Database Control System (DBCS) what to do with
specified data; the DBCS provides all database processing control at run time.
The four classes of DML statements are data definition, control, retrieval, and
update. An explanation of each class follows, together with important definitions
of members of that class:
Data definition—These entries define the specific part of the database to
be accessed by the application program and any keeplists needed to navigate
through it. The entries also result in the creation of a database user work
area (UWA). Transfer of data between your program and the database takes
place in the UWA. Your program delivers data for the DBCS to this area; it is
here that the DBCS places data requested from the database for retrieval to
your program.
SUB-SCHEMA
SECTION
Is the first section of the Data Division. It contains two
paragraphs: the Subschema entry (DB) and the Keeplist
Description entry (LD).
DB Names the target subschema, translates subschema record
descriptions to compatible HP COBOL record descriptions,
and creates a user work area (UWA).
LD Names a keeplist to help you navigate through the
database.
For more information on these entries see Chapter 3, Data Division.
Control—The DML control functions tell the DBCS when and how to begin
or end a database transaction.
COMMIT Terminates your transaction, makes permanent all
changes made to the database since the last quiet point,
and establishes a new quiet point for the run unit.
READY Prepares selected realms for use.
ROLLBACK Ends your transaction, cancels all changes made to the
database since the start of your transaction, empties all
keeplists, and nulls all currency indicators.
Retrieval—The DML retrieval functions are used to find a record in the
database and, if necessary, retain the record in the user work area (UWA) for
later use.
FIND Locates a record in the database.
FIND ALL Locates all specified records in the database and puts them
in a keeplist.
Program Organization and Structure 1–3