2 Sort Statements and Functions
The WFLEN Function
The WFLEN function returns the number of logical record pointers contained in the specified workfile.
WFLEN(file number)
The parameter is:
- file number
- A numeric expression specifying the file number of the workfile.
WFLEN returns a value from 0 through 231. If a FIND, QFIND or SORT BY has not been executed on the workfile, 0 is returned. 0 also indicates no entries in the workfile. -1 is returned when the contents of the workfiles are invalid (caused by pressing HALT ALL or CTRL Y or getting a disk error during a SORT BY or FIND statement). Executing WFLEN on a file other than a workfile causes an error.
Eloquence Sort Manual - 19 DEC 2002