Directives
FIND RECORD Locate & Read Data Record
   
Format FIND RECORD (chan[,fileopt])var$

Where:

chan Channel or logical file number of the file from which to read the data.
fileopt Supported file options (see also, File Options):
BSY=stmtref Traps Error #0: Record/file busy
DIR=num Direction indicator (not supported with [WDX] tag).
DOM=stmtref Missing record transfer
END=stmtref End-Of-File transfer
ERR=stmtref Error transfer
IND=num Record index
KEY=string$/num Record key
KNO=num | name$ File access key number (num) or name (name$)
REC=name$ Record prefix (REC=VIS(string$) can also be used)
RNO=num Record number
RTY=num Number of retries (one second intervals). This overrides the value defined by the 'WT' system parameter.
SIZ=num Number characters to read
TBL=stmtref Data translation table
TIM=num Maximum time-out value in integer seconds.
stmtref Program line number or statement label to which to transfer control.
var$ String variable. Receives the contents of the record being read.
Description 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 ProvideX, or when you want to read a complete record including data-field separators.

When executing a FIND RECORD directive, ProvideX 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.



*Note* If the record is not found when reading using a KEY= or IND= option, the current file position is not changed (unlike READ).


   
See Also EXTRACT Read and Lock Data
READ Read Data from File.
   
Examples 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