Enscribe Programmer's Guide

Table 2 Record Management Functions Summary (continued)
ProceduresDescriptionFunction
UNLOCKREC, UNLOCKFILE,
WRITEUPDATEUNLOCK
FILE_READUPDATE64_,
FILE_WRITEUPDATE64_,
READUPDATE, WRITEUPDATE
Updates a record in a random position in a file.Update
Comparison of Structured File Characteristics
The Enscribe product provides four types of structured files: key-sequenced files, queue files,
entry-sequenced files, and relative files. Table 3 (page 24) compares the characteristics of the four
types of structured files.
Table 3 Comparison of Structured Files
RelativeEntry-SequencedQueueKey-Sequenced
Records are ordered by
relative record number
Records are in the order in
which they are entered
Records are ordered first by
user key (if present) and then
by timestamp
Records are ordered by
value in primary-key field
Access is by record number
or alternate key
Access is by record address
or alternate key
Access is by primary key
(consisting of an optional
user key and a timestamp).
Access is by primary or
alternate key
Record number is primary
key. Length: 8 bytes.
Record address is primary
key. Length: 8 bytes.
Length of primary key varies
but must be at least 8 bytes
to hold a timestamp.
Length of primary key varies.
Key is actually part of
record.
The Enscribe software uses
record number to calculate
The Enscribe software uses
record address to find
The Enscribe software uses
index blocks to locate
The Enscribe software uses
index blocks to locate
the physical location of
record in file.
physical location of record
in file.
primary key, which is stored
in the record.
primary key, which is stored
in the record.
Space allowed per record is
specified when the file is
created.
Space occupied by a record
depends on length specified
when written.
Space occupied by a record
depends on length specified
when written.
Space occupied by a record
depends on length specified
when written.
Empty positions in file are
used for adding records.
Space at end of file is used
for adding records.
Free space in block or at
end of file is used for adding
records.
Free space in block or at
end of file is used for adding
records.
Records can be deleted,
shortened, or lengthened
Records cannot be deleted,
shortened, or lengthened.
Records can only be deleted.Records can be deleted,
shortened, or lengthened
(within the maximum size
specified).
(within the maximum size
specified).
Space freed by deleting a
record can be reused.
deleted, but its space can be
used for another record of
the same size.
Space freed by deleting a
record can be reused.
Space freed by deleting or
shortening a record can be
reused.
24 Introducing the Enscribe Record Manager