TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

506 Chapter11
B-Tree Indices
External Commands and Utilities Affected
arg [2] = (char) 0; /* upper half of version */
arg [3] = (char) 0; /* bottom half of version */
arg [4] = (char) 0; /* upper half of arg1 size field */
arg [5] = (char) 20; /* bottom half of arg1 size field */
arg [6] = (char) 0; /* upper half of arg2 size field */
arg [7] = (char) 0; /* bottom half of arg2 size field */
strcpy (arg [8], "SMITH@");
Example 4
I2 field, looking for keys >= 123 and <= 45698, using SPL:
double array
arg'd (0 : 3); ! 4 byte prefix + three I2 fields
integer array
arg'i (*) = arg'd;
integer
mode4 := 4;
byte array
arg' (*) = arg'd;
! find super-chain for SALARY in range [123..45698]...
arg'i := "[]"; ! range search
arg'i (1) := 0; ! version
arg'i (2) := 4; ! size of arg1 (in bytes)
arg'i (3) := 4; ! size of arg2 (in bytes)
arg'd (2) := 123d; ! arg1
arg'd (3) := 45698d; ! arg2
move item := "SALARY;";
dbfind (base, set, mode4, status, item, arg'i);
DBGET
DBGET has no changes to the calling sequence. It has the semantic change that chained
access modes can be used for both masters and details. For master data sets, DBGET mode 5
or 6 following a B-Tree DBFIND implies the next or previous qualified record of the master
data set. Also, DBGET mode 5 (forward chained read) and mode 6 (backward chained read)
may now traverse super-chains for a B-Tree index DBFIND on a detail data set.
NOTE
After a super-chain (B-Tree index DBFIND) read has started, a directed DBGET
(mode 4), may perturb the super-chain.