E@DBFINDMIDSUB
Name
The E@DBFINDMIDSUB call has the following format:
DN@<Logical>(E@DBFINDMIDSUB)
where <Logical> identifies the database file and index to use to perform the E@DBFINDMIDSUB call.
Description
When you need to process a range of data, starting at a given point in a subrange, use E@DBFINDMIDSUB.
Using the API in a Program
You can use E@DBFINDMIDSUB in conjunction with E@DBFINDSUBRNG and E@DBFINDNXTRNG.
The database routines perform an equal condition on all D@ index fields up to the subrange field designated in the E@DBSUBRNG. It performs a "where greater-than and less-than" condition on this index field.
Input Values
Field | Description |
---|---|
<Logical> | <Logical> in the E@ statement identifies the database file and index to use to perform the call. |
Record retrieval variables (also known as D@ and D# fields) | Fill in the D@ fields that define the point to position at in the mid-subrange, and also initialize any other D@ fields that do not define the mid-subrange. |
D#START#<KeyFieldName> | Define the beginning value of the last key by moving the appropriate values to the record retrieval field named D#START#<KeyFieldName> (starting value). |
D#END#<KeyFieldName> | Define the ending values of the last key by moving the appropriate values to the record retrieval field named D#END#<KeyFieldName> (ending value). |
E@DBSUBRNG | Move a number into E@DBSUBRNG in order to tell the interface which key is the last significant one defining the range. This number is equivalent to the position of the field in the index. |
Return Values
Field | Description |
---|---|
D<prefix>@NOTFOUND |
Each routine sets the logical value <FileName>-NOTFOUND or <FileName>-FOUND based on the outcome of the read process. The Find routines set D<prefix>@NOTFOUND to FALSE if a record is found, TRUE if a record is not found, or E@KEY@FOUND if the keys are found. |
Programming Example
|