RECNO( ) function

Returns the current record number.

Syntax

RECNO( )

Parameters

This function does not have any parameters.

Output

Numeric.

Remarks

You can use this function to output record numbers to a table, or to determine the relative location of a particular record within a table.

This function returns the current logical record number. If the table is not indexed, RECNO( ) starts with a value of 1 and increases by one for each record in the table. The logical and physical record numbers are identical.

If the table is indexed, RECNO( ) behaves similarly, but counts the records using the logical, not physical order. If the SEEK or FIND commands are used, the record number is reset to 1 after you execute these commands.

Note

When you reorder the records in a table, the record numbers generated by RECNO( ) are not reordered. To keep the record numbers with the records that they were originally associated with, extract the data to a new table using the Fields option before you reorder the records.

Example

The following example extracts records numbered 11 through 20 to a new ACL table:

EXTRACT RECORD IF BETWEEN(RECNO( ),10,20) TO “Subset.fil”

Related reference
FIND( ) function


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback