E@DBLOCKFLTGE

Name

The E@DBLOCKFLTGE call has the following format:

DN@<Logical>(E@DBLOCKFLTGE)

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

Description

Makes the database call and locks the record.

E@DBLOCKFLTGE reads and locks 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 and the filter created earlier in the program.

Input Values

Field Description
<Logical>

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

E@ does not need to point to an existing record. 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.

Filter value parameter Set this parameter using a method described in Setting the Filter Parameter Value, and create the filter using the routine described in U@FLTCREATE.

Return Values

Field Description
D<prefix>@NOTFOUND 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

Once the filter is defined and set, make a call to the database API using the Index Filter calls just like a Find:

C           IF        E@ERRORNBR <> *ZEROS
C           RETURN
C           ENDIF
C           CALLP     CVPOBML#LCLSTR
C           IF        VPOBML#OBJTYP = *BLANKS
C           EVAL      VPOBML#OBJTYP  = VPOBML#BYOBTY
C           ENDIF
C           EVAL      E@FLTSTRING    = '(BUY-BUY-OBJ-ID = ?)'
C           CALLP     U@FLTCREATE
C           EVAL      E@FLTVNUMERIC  = *ZEROS 
C           CALLP     U@FLTSNUMERIC
C           CALLP     U@BEGSUBTRAN
C           CLEAR                   D@PRCRGR
C           CLEAR                   D@BYRCD
C           CALLP     DN@DBPOBUY1(E@DBLOCKFLTGE)

C           DOW       DBUY@NOTFOUND = FALSE