ProvideX V8.20 > Language Reference > 3. System Functions
455
IND( ) Function
            Return Next Record Index
Format
IND(chan[,fileopt])
Where:
chan
Channel or logical file number of the file to reference.
Supported file options (see also, File Options, p.808):
fileopt
ERR=stmtref Error transfer
END=stmtref End-Of-File transfer
KEY=string$ Record key
KNO=num | name$ File access key number (num) or name (name$)
RNO=num Record number
stmtref
Program line number or label to transfer control to.
Returns
Record index (next or specified record).
Description
The IND( ) function returns the record index of either the next record in the file
specified or, on a Direct or Keyed file using the KEY= option, the record index for the
record identified by the key.
For Direct/ Keyed or Sort files without the KEY= option, the value returned is the
record index for the record with the next higher key value.
For variable length Direct/Keyed files, the value returned is an internal pointer to
the record.
For more information, see File Handling in the ProvideX User's Guide.
Example
0010
OPEN (13) "CUSTNO"
0020
LET I=IND(13,END=1000)
0030
READ (13,IND=I) R$
0040
PRINT "Rec#: ",I," Data: ", R$
0050
GOTO 0020
1000
PRINT "End-of-file"
1010
END