File_Field_Find - DataDictionary

Allows you to simulate the find-key process of data entry objects within batch processes

Type: Procedure

Parameters: Integer iFindMode Integer iFile Integer iField Integer bEntUpdt Integer bShowErr Integer bDfrd

ParameterDescription
iFindModeMay 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
iFileNumber of the table in the current filelist
iFieldNumber of the field in the table
bEntUpdtDetermines whether data should be moved from local DD buffer to file buffer before the find
bShowErrDetermines whether find errors will be reported
bDfrdDetermines whether the find should be deferred


Syntax
Procedure File_Field_Find Integer iFindMode Integer iFile Integer iField Integer bEntUpdt Integer bShowErr Integer bDfrd

Call: Send File_Field_Find iFindMode iFile iField bEntUpdt bShowErr bDfrd


Description

The File_Field_Find procedure allows you to simulate the find-key process of Data Entry Objects (DEOs) within batch processes.


If the bShowErr parameter is True, it only generates an error if the field is not indexed. If the field is indexed, it generates an error, but this is suppressed by the error system. In legacy character mode applications, errors 41 and 42 were shown.

If the bDfrd parameter is True, it means that the find uses the DD, but the local buffer does not get updated and Refind_Records is sent.

The bEntUpdt parameter is usually always passed as True, as you want a find to operate from the local DD buffer instead of the global record buffer where you can make use of the Find message.

Sample

The following code:

Set Field_Current_Value of oOrderHeaderDataDictionary Field OrderHeader.Order_Number to 111
Send File_Field_Find of oOrderHeaderDataDictionary EQ File_Field OrderHeader.Order_Number True True False

Is similar to:

Move 111 to Orderheader.Order_Number
Send Find of oOrderHeaderDataDictionary Eq 1