Contents - Index


 

Use Find to move the cursor forward (toward the bottom) from the current line to the first line having a specified string of characters at a specified column.

 

Find may also be entered as F.

 

Optional Operands

 

STR is the string to search for.  Up to 72 characters may be specified. If the value of STR begins with the backslash character (\), the search will use Extended Search Pattern rules.

 

 Default: The value for STR and any other operands not specified will be inherited from previous search commands, also as described below.

 

COL specifies the column to search at.  COL must be a value from 1 to the session maximum line width.  If COL and STR are not specified, the COL specification is inherited from previous search commands.

 

 Default: If COL, after any inheriting, is not specified, the current session FINDCOL value is used.

 

CASE specifies whether upper/lower case should be considered when determining matches.  If specified as U or I[gnore], case is ignored (the matches The). If specified as M[atch], both case and letters must match.  If CASE and STR are not specified, the CASE specification is inherited from previous search commands, as described below.

 

 Default: If CASE, after any inheriting, is not specified, U is assumed.

 

FILTER specifies a string or set of strings.  If the STR string is found at the search column, but the FILTER string is also found at the search column, the STR string will be considered to have not been found.  To specify multiple strings for this operand, enclose the strings in parentheses, and separate them from each other by by commas or spaces.  If one of the strings contains a blank, comma, or right parenthesis character, enclose the string in apostrophes (') or quotation marks (").  The following are valid FILTER values:

 

         FILTER=DATES

         FILTER=(DATES,DATE-TO-COMPLETE)

         FILTER=(DATES DATED)

         FILTER=('DATE OF',DATED)

 

 Although its use is not rejected, the operation of FILTER with respect to Extended Search Pattern is undefined.  In general, this operand should not be used when an Extended Search Pattern is specified for STR.

 

Find may be invoked without operands by pressing Alt-F.

 

An error message will display if no match is found.  If a match is found, the cursor will be placed at the match.

 

If STR is not specified on the command, BIM-EDIT/XP uses as default operand values those from previous search commands.  Using this feature, you can easily request searches that are similar or identical to the last one.  For example, after a Find command that failed because the instance is backward from the current line, you need only enter

 

   => findup

 

to repeat exactly the same command in the backward direction.  To achieve this, BIM-EDIT/XP stores a previous value for the STR, COL, CASE, and ZONE operands of the search commands (FileScan, Find, FindFirst, FindUp, Locate, LocateUp, NotFind, NotFindUp, Qualify, ExcludePattern, IntegratePattern, or SelectPattern). These previous values will be inherited by operands omitted from a search command that does not specify STR.  Whenever a search command specifies STR, the previous values are set to those specified on that command or not specified.

 

A long-running Find can be interrupted by pressing Ctrl-Break.

 

Return Codes

 

OK Successful.

AT Command interrupted by user (Ctrl-Break pressed).

NF String not found.

 

Procedure Notes

 

Find sets the pre-defined variables SslCsRow and SslCsCol to the line and column where the match was found if the search is successful.

 

Examples

 

Search for COBOL label "A20-READ" (assume that the session FINDCOL is 8):

 

   => f a20-read

 

Search for the string "Examples" in column 1 (case dependent search):

 

   => f Examples,1,case=m

 

Search for the same string as the last search:

 

   => f

 

Search for DC or DS in column 10:

 

   => f \DC|DS 10