E@DBLOCKFLTBEG

Name

The E@DBLOCKFLTBEG call has the following format:

DN@<Logical>(E@DBLOCKFLTBEG)

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

Description

Makes the database call and locks the record.

E@DBLOCKFLTBEG reads and locks the first database record in the range based on 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.

Using the API in a Program

The database routines perform an equal condition on all D@ fields that have an assigned value—that is, all columns up to, and including, the field moved to the E@DBBEGRNG.

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 only the D@ fields that define the appropriate range; leave empty those D@ fields that do not define the range.
E@DBBEGRNG Move a number into E@DBBEGRNG 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.
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

This example is from PR33.

C          EVAL      VPRTRD@LPMSSW  = FALSE
C*
C          EVAL      VPRTRD@LPI1    = 1
C          DOW       VPRTRD@LPI1 <= VPRTRD@LPDLMX
C                    AND VPRTRD@LPDLLV(VPRTRD@LPI1) <> *BLANKS
C                    AND VPRTRD@LPMSSW <> 1
C          EVAL      D@CYCPRC       = *BLANKS
C          EVAL      D@PRGRP        = *BLANKS
C          EVAL      D@PRCLVL       =
C                    VPRTRD@LPDLLV(VPRTRD@LPI1)
C          EVAL      D@BNKCD        = *BLANKS
C          EVAL      E@FLTSTRING    = *BLANKS
C          EVAL      E@FLTSTRING    =
C                    '(PMN-LP140-RUN-FLG = ?)'
C          CALLP     U@FLTCREATE
C          EVAL      E@FLTVALPHANUM = '*'
C          CALLP     U@FLTSALPHANUM
C          EVAL      E@DBBEGRNG     = 5
C          CALLP     DN@DBPRPMN1(E@DBLOCKFLTBEG)
C          IF        DPMN@NOTFOUND = FALSE
C          EVAL      DPMNLP140R     = '4'
C          CALLP     DPMN@IO(E@DBSTORE)
C          EVAL      VPRTRD@LPMSSW  = TRUE
C          EVAL      E@ERRORCAT     = 'PRTRD'
C          EVAL      E@MSGNBR       = 257
C          CALLP     U@GETMSG
C          EVAL      VPRTRD@LPMSG   = E@CRTMESSAGE
C          ENDIF
C          ADD       1             VPRTRD@LPI1
C          ENDDO