850-MODFILTER-NLT-<Index>

Name

850-MODFILTER-NLT-<Index>

Description

Makes the database call and locks the record.

850-MODFILTER-NLT-<Index> reads and locks the record whose key field is greater than or equal to the values you set in the record retrieval variables (DB fields) corresponding to the index key fields and the filter created earlier in the program.

Input Values

Field Description

<Index>

You must specify the index in the statement.

850-MODFILTER-NLT-<Index> does not need to point to an existing record. If you define a generic value for the record search, the routine returns a record and sets the <FileName>-FOUND value for any database record successfully read.

Record retrieval variables (also known as DB fields)

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

You do not need to fill all DB 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 890-CREATE-FILTER.

Return Values

Field Description
<FileName>-SW The Find routines set the <FileName>-SW switch to indicate the outcome of the read.

<FileName>-NOTFOUND

<FileName>-FOUND

Each routine sets the logical value <FileName>-NOTFOUND or <FileName>-FOUND based on the outcome of the read process.

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:

2000-START.

    IF (ERROR-FOUND)
        GO TO 2000-SECTION-END.

    INITIALIZE                         POBMLWS-LOCAL-STORAGE.

    IF (POBMLWS-OBJ-TYPE = SPACES)
        MOVE POBMLWS-BUYER-OBJ-TYPE     TO POBMLWS-OBJ-TYPE.

    MOVE "(BUY-BUY-OBJ-ID = ?)"     TO FILTER-STRING.
    PERFORM 890-CREATE-FILTER.

    MOVE ZERO                       TO NUMERIC-FILTER-VALUE.
    PERFORM 890-SET-NUMERIC-FILTER-VALUE.

    PERFORM 910-BEGIN-SUB-TRANSACTION.
    INITIALIZE                         DB-PROCURE-GROUP
                                              DB-BUYER-CODE.
    PERFORM 850-MODFILTER-NLT-BUYSET1.
    PERFORM UNTIL (BUYER-NOTFOUND)