Find - DataDictionary

Performs a find operation on the DataDictionary's main data file using the passed mode and index

Type: Procedure

Parameters: integer iMode integer iIndex

ParameterDescription
iModeMay be any of the standard find modes, i.e., LT, LE, EQ, GE, or GT, or it may be either Next_Record, First_Record, or Last_Record
iIndexThe table index to use to perform the find operation


Syntax
Procedure Find integer iMode integer iIndex

Call: Send Find iMode iIndex


Description

The Find procedure performs a find operation on the DataDictionary's main data file using the passed mode and index. If find is successful, performs a relate on file. If file is the same as this object's Main_File, sends Relate_Main_File. Notifies other connected DataDictionary objects (DDOs) of the result of the find operation. Sets the Found indicator to reflect the success or failure of the find operation.

This is identical to Request_Find with the exception that a file number does not need to be passed. In fact, the find message sends Request_Find to perform its task. This message was provided to provide an easier way for developers find records. This will be used by batch processes to find records within a DD.

Sample

Procedure DoProcess
    Handle hDD	
    String sStat

    Get Server to hDD
    Send Clear of hDD
    Repeat
        Send Find of hDD GT 1
        If not (Found) Procedure_Return
        Get Field_Current_Value of hDD FIELD Customer.Status to sStat
        If (sStat="D") Begin
            Send Request_Delete of hDD
        End
    Loop
End_Procedure


Data Dictionary SQL Filters

Data Dictionary SQL Filters can be used with this method. See pbUseDDSQLFilters for more information.

Next_Record

Find mode Next_Record will use the same find direction and index as the prior Find operation (in other words, the index passed with Next_Record is ignored). Using find mode Next_Record must be preceded by a find using one of the other modes, or it will result in an error.

Find is not re-entrant. Once a major Data-Dictionary operation (save, find, delete, clear) has begun you cannot start another major operation. The reentrancy restriction applies within DDO structures and across DDO structures.

See Also

Finding - Find, Request_Find and FindByRowId | Find and Clear Operations in DDOs