S Search and Display the results

S ...=P [ L ] If a record containing the string is found, it is displayed in Line mode on the screen, and the search continues. This variation of the Search command is analogous to the EDT command, ON&P'....' .

S .... represents a single/multiple search argument as described in the previous section "Search for Character Strings (Simple/Multiple Search Argument)".

The record contents of SAM and PAM files will be prefixed with the respective record or block number. After a maximum of 21 records have been displayed, an overflow control line will appear ("Please acknowledge / End: K1"). Pressing the K1 key will abort the search process. Any other key will cause the search to continue to the end of the file, or to the limit of the search range (Snn,'...'=P).

When the search process has finished, the display window is repositioned where it was at the start of the Search command.

As standard, only one line (80 bytes) is displayed per search hit. If the search item does not occur in the first 80 bytes of the record, then a section of the record will be displayed with 40 bytes to the left and right of the item.

PL Print Long. The resulting record is displayed to a maximum length of 2048 bytes on the screen.

Note:

After displaying the hit record, the search condition is still stored. Entering the command S will cause the window to be positioned at the next record containing the search string.

Examples:

S,'MVC'*'BLANK'=P

Search from the first record currently displayed to the end of the file for records containing the string 'MVC', and to the right of that, 'BLANK'. All such records will be displayed in Line mode on the screen. When the search has finished, the window will be redisplayed where it was when the Search command was entered.

S100,:100-200:X'47'=PL

Search the next 100 records/blocks in the column range 100 - 200 for the string X'47'. The full length of the resulting records will be displayed.