next previous up contents index
Next: RNLOCATE Previous: RETURN Up: The Commands in Detail


RLOCATE   [col1 [col2]] [/string/[H][I]]
RL

Related command: LOCATE, also NLOCATE and RNLOCATE/NRLOCATE

This command serves to search for character strings backwardly. As parameter you specify a character string that has to be surrounded by delimiters, normally. Above, the slash (`/') is used as delimiter; any other character is allowed. In practice, the special key on the lower left of the keyboard has proved helpful. You only use another one if this character occurs in the character string to be searched for. You may omit the delimiter at the end of the string if the rest of the command line remains empty.

launches a backwards search for the character string `abc',

launches a backwards search for the character string `a/b',

launches a backwards search for the character string `bc' because `a' is the initial delimiter and the final delimiter is missing. rl abca would do a reverse search for the character string `bc',too.

It is important to note that the final delimiter is essential if you concatenate commands:

does a reverse search for the string `abc' and executes the command -2 while

would search for the string `abc ;-2' backwardly.

The reverse search starts at the record before the one in the current line.

If the character string is found, the record containing it appears in the current line; the workfile section displayed is moved accordingly.

If the character string is not found, the following message appears:

The ... are replaced by the search string and the current line remains unchanged.

If exaEdit could not find the character string until the first record of the workfile has been reached, the reverse search continues at the last record of the workfile, normally. The reverse search goes on until either the character string is found or the starting record of the reverse search is reached, again. The word `normally' above means that the switch manipulated by the command WRAP has to be turned ON.

To show that the reverse search has been continued at the end of the workfile, you receive the following message in the window:

This message either is followed by the positioning of the workfile section on the display when the character string is found or it is followed by the message of failure when the character string could not be found.

Contrasting, if WRAP OFF is valid, the reverse search ends at the first workfile record, latest. If the reverse search was not successful, the messages

are generated.

Frequently, it is necessary to search for the same character string for several times. In this case, it is sufficient to enter RLOCATE without any parameter: The last character string is used automatically.

The commands RLOCATE, LOCATE, NLOCATE and RNLOCATE use the same character string.

By default, the complete record will be searched backwardly. By giving two column numbers as first parameters the search is restricted to that area. A character string will then only be found if the given area contains it fully. If only one column number is given, the search area goes from that column to the end of the record. The command ZONE can also be used for column restrictions (see description). When both ZONE and the column number parameters are in effect, the latter one precedes.

If RLOCATE is used a second time, and then without any parameters, possible column restrictions are still in effect. But if a new search string is given, the restrictions are no longer in effect. A RLOCATE with a (new) column restriction after another RLOCATE will use the same search string as the first RLOCATE.

A hexadecimal reverse search can be done by giving the parameter

To this end, the given character string must be written in hexadecimal form. Since 1 byte is always defined by 2 hexadecimal characters, exaEdit always demands that the amount of the entered hexadecimal characters is even. Otherwise exaEdit will generate the error message Entering a character that is not hexadecimal results in the error message If, for example, the next record containing a tab sign (hexadecimal 09) should be found, the command could be used.

When the parameter

( = `case-insensitive') is given, the search for the character string will be case insensitive (i.e. no distinction between lower and upper case characters). This means that will find either ab or Ab or aB or AB.

If you have to use the parameter I regularly, the use of the command CASE is recommended. CASE can force other commands to act as if the parameter I was given. For further information see CASE.


next previous up contents index
Next: RNLOCATE Previous: RETURN Up: The Commands in Detail