S Search (simple Search argument)

S [-] [n] ,[col] [r] item [, R] [, NC] [,SR]

A search is made for the specified character string starting from the first displayed record to the end/beginning of the file. The window is positioned on the first record to contain the search string. A Search command to find the next occurrence of the string is automatically placed in the command field.

Pressing the DUE1/ENTER key (sending this suggested command) will continue the search.

- Backward Search: The search proceeds from the first displayed record towards the beginning of the file.

Standard: Search towards the end of the file.

n Number of records to which the search should be restricted.

Standard: an unrestricted number of records.

col Column range in which the character string should be found.

:col1-col2:

The first character of the search string must begin in the range between col1 and col2.

:col1:

The character string is only sought in the specified column col1, and must begin there.

>:col1: | <:col1:

The character string will be sought in the range from col1 to the end of the record (>:col1:), or from the beginning of the record to col1 (<:col1:).

Standard: Search the entire column range (from column 1 to the end of the record).

r > | < | -

> Search for a character string >  item

< Search for a character string <  item

- Search for a character string not equal item

Standard: Search for a character string = item.

item Search string: C'string' | L'string' | X'string' | A'string'

C'string' can be abbreviated to 'string'. In many cases, even the quotation marks can be omitted. See the Notes.

L'string': Lowercase characters in string are not converted to uppercase.

If string contains quotation marks ('), then these should be doubled ('').

A'string': During the search, no distinction is made between uppercase and lowercase.

Example: The search string A'CFS' will return a hit if the record contains the string 'CFS' or 'cfs' or any combination of uppercase or lowercase.

The Search command also offers the possibility of specifying multiple search arguments linked with and/or/wildcard syntax. The syntax is a continuous sequence of the search arguments described in this section, and will be described in detail in a following section entitled "Search for Character Strings (Multiple Search Arguments)".

R Reverse. The search within the records will not proceed as usual from left to right, rather from right to left. If this mode is used, it is not possible to use And, Or or wildcard operators to link multiple search conditions.

NC No Columns. In DL mode (Display Long), the column positioning for a hit is suppressed for the current search (same as in DS mode). The optional parameter NC of the DL command functions similarly). DL,NC will set the NC mode for all following search commands in the current file.

SR Single Record. This indicator is only relevant for a negative search, i.e. when searching for a string other than the value specified (e.g. S,-X'00').

By default, when conducting a negative search without specifying a column range, a record will only be recorded as a hit if the search string does not appear in the complete record.

In SR mode, the first instance in the record of the non-appearance of the search string will be recorded as a hit. Entering the option R (see above) will automatically enable SR mode.