FIND RECORD |
Locate and Read Data Record |
FIND RECORD (filespec[,fileopt])var$
filespec |
Can be a numeric expression indicating the open channel number to use or a string expression containing the pathname or table name (if string is prefixed by the keyword TABLE) of the file to use. | ||||||||||||||||||||||||||||||
fileopt |
Supported file options (see File Options):
| ||||||||||||||||||||||||||||||
var$ |
String variable. Receives the contents of the record being read. |
(TABLE support was added in PxPlus 2018.)
Use the FIND RECORD directive to read a record from the file (channel) you specify. The record's complete data portion will be returned in the string variable you name. Apply the FIND RECORD statement when dealing with native-mode operating system files, when exchanging data with applications other than PxPlus, or when you want to read a complete record including data-field separators.
When executing a FIND RECORD directive, PxPlus advances the file position to the next record (or the record you specify in a KEY= or IND= option). Use the KNO= option to change the current file access key.
EXTRACT Read and Lock Data
READ Read Data from File
0020 open lock (2)"NEWFIL"
0030 find record (1,end=1000)R$
0040 write record (2)R$
0050 goto 0030
1000 close (1),(2)
1010 end