KEC( ) |
Return Key of Current Record |
KEC(chan[,fileopt])
Where:
chan |
Channel or logical file number of your given file. | ||||
fileopt |
Supported file options (see File Options):
| ||||
stmtref |
Program line number or statement label to which to transfer control. |
Current key or current logical position in file.
The KEC( ) function returns the current record's key. The result is based on the:
Typically, the KEC( ) function is used after you read a record to determine the key of the record you just read (i.e. the key of the current record or current position in the file).
0010 open (13) "CUSTNO"
0020 read (13,kno=0)R$
0030 let K$=kec(13),K1$=kec(13,kno=1)
0040 print "Key: ",K$," Alt: ",K1$," Data: ",R$
0050 goto 0020
1000 print "End-of-file"
1010 end