19.2.3.5 Reading Records from a Disk File
You read data by defining a record buffer and reading the
data from the device with GET statements. After the data
has been retrieved with a GET statement you can deblock the
data with MOVE or REMAP statements.
In the following example, each disk block contains twelve 40-
byte records. Each record contains a 32-byte string, a 4-byte
SINGLE number, and a 4-byte LONG integer. After each
GET operation, the FOR...NEXT loop uses the REMAP state-
ment to redefine the position of the variables in the record. At
the end of the file, the program closes the file. See Chapter 8
and the DEC BASIC and VAX BASIC for OpenVMS Systems
Reference Manual for more information about the MAP,
MAP DYNAMIC, and REMAP statements.
EXAMPLE: Click to display EXAMPLE.