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

504 Chapter11
B-Tree Indices
External Commands and Utilities Affected
@
c
wildcard search. Scan argument for the first wildcard
character. (Call that character position
n
, 1-based). Search
for keys that match first
n
1 characters of argument. If
c
is non-blank and non-null, then it is the wildcard
character that will be used. Some examples are: @* and
@@. If
c
is a blank or null, then the current default
wildcard (stored in the root file) is used. The wildcard
character is changeable via the DBUTIL SET command or
DBCONTROL mode 15.
PK Partial Key search. Search for key values that match
n
characters in argument1 (
n
is length of argument1
provided in bytes 5-6). Argument1 need not contain a
wildcard. If it does within the
n
characters, it will be
included in the search. For example, if argument1 is
ABC@, bytes 5-6 have 4 for length, and the wildcard for
the database is @, DBFIND will return records containing
ABC@ as the first four characters in the key value.
3-4 version number. It must be numeric zero, or an error will be returned.
5-6 The size (in bytes) of argument1 (not including these two bytes) for search
types < , <=, = , >=, > , @
c
, PK.
7-8 The size (in bytes) of argument2 (not including these two bytes) for the
between search type [ ].
9... 9+n-1 Argument1. The
n
bytes of argument data (for example, for an X10 field,
n
= 10).
9+n... 9+n+m-1 Argument2. For search-type [ ] only. The
m
bytes of the second argument's
data (for example, for an X10 field,
m
= 10,
n
must match
m
). Must be
numeric zero for other search types, or an error is returned.
If a wildcard character is present in the argument(s), the wildcard will be considered as
part of the value for these B-tree search types: = , < , <=, > , >=, [ ], and PK on ASCII types.
Pascal/iX Example
A Pascal/iX view of the above is:
type
dbfind_structured_arg_type = $alignment 2$ record
dbf_type : pac2; {e.g., "<="} {0 @ 2}
dbf_version : shortint; {must be 0} {2 @ 2}
dbf_arg1_bytes : shortint; {4 @ 2}
dbf_arg2_bytes : shortint; {6 @ 2}
{NOTE: arg1 data is variable sized...2 to 256 bytes}
{ and, arg2 data might not even be present. }
{ Still, the following serve to define a record}
{ that can hold the worst case arg1 & arg2... }
dbf_arg1_data : packed array [1..256] of {8 @ x}
char;