You are here: Commands > Sequence

Sequence

Menu: Found in the ANALYZE menu

Use the Sequence command to determine if key fields in the current file are in sequential order. Most often, Sequence is used to determine if a file is sorted properly.

Sequence always checks the designated key fields to determine if they are in sequential order and reports on the results. You can specify whether to test the sequence for ascending or descending order. Sequence errors are only reported up to a specified error limit.

This command can be auto-executed. For more information on the Autoexecute Commands preference, see Command Options.

Parameters

In addition to the command parameters described below, the Sequence command has the following command parameters: Append, First, If, Next, To and While. For a description of these parameters, see Command Parameters. For a description of supported field modifiers see Field Modifiers.

On

Specifies the key field(s) or expression(s) you want to check for proper sequential order. In the command dialog, select the fields from the “Sequence Key Fields” list box or click [Choose] to display the Selected Fields dialog. For information on the Selected Fields dialog, see Selection/Edit Dialog Boxes.

Errorlimit

Specifies the maximum number of data sequence errors to report. In the command dialog, click the [More] button, then enter the maximum errors in the “Stop processing after...” text box.

Default: 20. The default may be changed globally through a Command Options preference setting. See Command Options for details.

If Sequence is issued in a Group command, Analyzer completes the command execution to avoid interfering with the processing of the Group command, but no further data sequence errors are reported.

Command Mode Syntax

SEQUENCE <ON> key-field(s) <D>...

<TO text-file-name|SCREEN>

<IF test> <WHILE test> <FIRST|NEXT range>

<ERRORLIMIT=n>

<APPEND>

<OPEN>¿