You are here: Command Parameters > First

First

First is a scope parameter that causes a command to be executed on a consecutive number of records, starting with record 1. Processing terminates after the specified number of records has been reached. First is not dependent on current record position.

After execution of a command containing a First parameter, the record position is set at the record immediately following the number of records specified in the command. If the end of the file was reached during execution, the record position will be reset to record 1.

The First parameter can also be used in conjunction with If or While parameters. After execution of a command in which both First and While are specified, the record position is determined by the While parameter.

Command Mode Syntax

FIRST n

In the following example, First causes the Total command to terminate after 10 records:

TOTAL ALL FIRST 10

The record position will always be 11 after the above command has been executed, regardless of the position at the start of the command.

Command Dialog Box

The First option is available by clicking the [More] button in most command dialogs. Simply click the “Limit Processing To” pull-down, select First and then specify the number of records in the adjacent text box.

Simply enter the number of records to process from the first record in the file in the First text box.