E@DBFINDFLMDSB

Name

E@DBFINDFLMDSB

The E@DBFINDFLMDSB call has the following format:

DN@<Logical>(E@DBFINDFLMDSB)

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

Description

When you need to process a range of data, starting at a given point in the range, use E@DBFINDFLMDSB.

Using the API in a Program

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) Define the beginning and ending values of the last key by moving the appropriate values to the record retrieval fields named D@<KeyFieldName> and D#END#<KeyFieldName>.
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

The following example uses E@DBFILTERSUBR and then E@FINDFLMDSB to reposition.

     EVAL      E@FLTSTRING    = "(ARH-ORIG-AMT > ?)"
     CALLP     U@FLTCREATE 
     EVAL      E@FLTVSIGNED2  = 45
     CALLP     U@FLTSSIGNED2
     IF        F1@FC = 'I'
     EVAL      D@ALTTP        = F1@SVARTY
     EVAL      D@CMPNY        = F1@SVCMPNY
     EVAL      D@INVC         = PWSFRINVC
     EVAL      D#END#INVC     = PWSTOINVC
     EVAL      E@DBSUBRNG     = 3
     CALLP     DS@DBARARH6(E@DBFILTERSUBR)
     ELSE      
     IF        F1@FC = '+'
     EVAL      D@ALTTP        = F1@PTARHT
     EVAL      D@CMPNY        = F1@PTARH
     EVAL      D@INVC         = F1@PTARHI
     EVAL      
     EVAL      E@DBSUBRNG     = 3
     CALLP     DS@DBARARH6(E@DBFINDFLMDSB)