Previous Topic: Components Used with the FIND CommandNext Topic: Operand Definitions


FIRST Command

The FIRST command locates the first occurrence of a string of characters. The search begins with the first line and processes forward through the last line.

You can use this command with certain components (see Notes). FIRST can locate statements the compiler marked as errors in a procedure definition. When editing a report definition, working data, or parameter definition, FIRST applies only to the field name.

Use the COLUMNS operand or the SET EDIT BOUNDS command to restrict the search to an inclusive range of columns. You can use FIRST to locate a specific number of occurrences.

This command has the following format:

      [1  ] [/string/]
FIRST [n  ] [ERROR   ]
      [ALL]        
       [COLUMNS start‑column [MAX       ]]
       [                     [end‑column]]