5-70 Command Reference
READ
Purpose Copies the current record from the lookup file into the appropriate working buffer.
Syntax READ
record
[
( table-name )
] [
,
[
invalid label
] [
, valid label
] ]
Process The READ command copies the current record into the appropriate working buffer,
specified by
record
. After the script copies the current record into the buffer, the
pointer advances to the next
record
in the file.
Table-name
selects which lookup
table to read.
Record
can be one of the following:
Record
Description
LOOKUP Copies the Lookup Table record into the Lookup
Buffer
Rule: A successful read increments the file pointer to the next record.
Optional Fields
Invalid
and
valid labels
are discussed in "Script Flow" at the beginning of this
chapter. The exception is as follows:
If there is no record to read or the current record is pointing to a different record
type, and
invalid label
is defined, control passes to that label.
Example
This example shows how the software copies the current lookup table record into
the lookup table buffer. Control passes to the next line.
READ LOOKUP
See Also
BSEARCH
QUERY
SEEK