Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
last = %RECNUM(channel)
The number of the last record processed on channel. If no operation has occurred on the file, %RECNUM returns a value of zero. (i)
The channel to check for the last record processed. (n)
%RECNUM is valid for any non‑ISAM file, but it is only updated on a successful I/O operation.
Encountering end‑of‑file does not change the value of %RECNUM. When you encounter end‑of‑file, you can use %RECNUM to get back to the last record that was processed.
%RECNUM is not updated on a FIND because FIND does not transfer data.
The following function returns the number of records in a file.
function numrecs a_data ,a a_chn ,d
proc read(a_chn, a_data, ^last) freturn %recnum(a_chn)