Technical data
FIND
FIND
Function
The FIND statement locates a specific record in the database and establishes it
as the current record of the run unit. The FIND ALL statement locates zero or
more records in the database and inserts them into the named keeplist.
General Formats
Format 1
FIND database-record
FOR UPDATE
RETAINING
REALM
RECORD
SET
set-name
...
{ set-name } . . .
CURRENCY
AT END stment
NOT AT END stment2
ON ERROR stment NOT ON ERROR stment2
END-FIND
Format 2
FIND ALL keeplist-name
record-name
WITHIN
realm-name
set-name
USING { rec-key } . . .
WHERE { bool-expres }
FOR UPDATE
AT END stment
NOT AT END stment2
ON ERROR stment NOT ON ERROR stment2
END-FIND
database-record
represents a record selection expression. References are made to a record in the
database according to the rules for Record Selection Expressions (see Section 4.6).
set-name
names a subschema set type.
stment
is an imperative statement executed for an at end or on error condition.
stment2
is an imperative statement executed for a not at end or not on error condition.
Procedure Division 4–35