E@DBFINDGE

Name

The E@DBFINDGE call has the following format:

DN@<Logical>(E@DBFINDGE)

where <Logical> identifies the database file and index to use to perform the E@DBFINDGE call.

Description

E@DBFINDGE reads the record whose key field is greater than or equal to the values you set in the record retrieval variables (D@ fields) corresponding to the index key fields.

E@DBFINDGE, with its ability to reposition within a cursor, is useful for recovery of batch jobs and continuation after a transaction ends in online programs where the end of the main transaction closes all open cursors.

Using the API in a Program

E@DBFINDGE must precede a E@DBFINDNXT or E@DBFINDPRV.

Input Values

Field Description
<Logical>

<Logical> identifies the database file and index to use to perform the E@DBFINDGE call.

E@DBFINDGE does not need to point to an existing record (unlike the E@DBFNDEQ routine). If you define a generic value for the record search, the routine may return a record and sets D<prefix>@NOTFOUND accordingly.

Record retrieval variables (also known as D@ and D# fields)

You must populate the index key fields used to locate the record before using this call.

You do not need to fill all D@ fields with actual values, because the routine does not need to point to an existing record. Instead, fill those fields that are not required as delimiters with zeros or spaces, depending on whether the fields are numeric or alphanumeric fields. If you need to know whether the record exactly matches the key fields you passed, you must check to see if the record matches the generic values you set.

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

This routine precedes the routines E@DBFINDNXT or E@DBFINDPRV, as shown in the examples for E@DBFINDNXT or E@DBFINDPRV.