5-76 Command Reference
SEEK
Purpose Positions the record pointer within the lookup table.
Syntax SEEK
modifier
,
file-type
[
( table-name )
] [
,
[
invalid label
] [
, valid label
] ]
Process The SEEK command positions the record pointer within the lookup table, according
to
modifier
.
Modifier
specifies the current record's placement and can be one of the following:
Modifier
Description
NEXT Advance to next
record
PREVIOUS Move to previous
record
START Reset to beginning of
file
END Advance to last
record
File-type
specifies the type of file and can be one of the following:
File-type
Description
LOOKUPFILE Lookup Table File
Table-name
selects which lookup table to seek.
Optional Fields
Invalid
and
valid labels
are discussed in "Script Flow" at the beginning of this
chapter. The exceptions are as follows:
If the NEXT modifier advances the current record past the end of the file, or the
PREVIOUS modifier moves the current record before the beginning of the file,
control passes to
invalid label
(if defined).|
When the selected file is empty, any modifier triggers an end of file condition.
Then, control passes to
invalid label
(if defined).
Example 1
This example advances the current record in the lookup table by one record, and if
an end of file condition occurs, control passes to *EOF_LABEL.
SEEK NEXT,LOOKUPFILE,*EOF_LABEL
See Also
QUERY
READ