FindText command
The FindText command searches for a specified string in members. For more information about FindText options, see Figure 1.
Syntax
Operands
- search_string
- The string to be found. If it contains blanks or special characters, the text-string should be enclosed in quotation marks. The search string can be hexadecimal and case-sensitive SBCS characters, as well as DBCS search strings.
- All
- All members are searched, and finds are flagged for each member.
- First
- Searches from the first member that is displayed on the screen.
- Last
- Searches from the last member that is displayed on the screen.
- Next
- Searches from second member that is displayed on the screen.
- Prev
- Finds the previous member where a match is found.
- Char
- Searches for a character string.
- Word
- Searches for a non-alpha and non-numerical word string. The following
characters are considered as alpha characters:
$ @ #
- Mask
- Searches for a string that matches a pattern mask. The following
signs can be used in a pattern mask:
- Asterisk (*)
- Indicates any character string that contains zero or more characters.
- Percent sign (%)
- Indicates any single character.
Note:- Pattern masks that consist of only asterisk (*), percent sign (%), or both are invalid.
- Hexadecimal notation and blanks are not allowed for pattern masks.
- Report
- Displays the complete MSL FINDTEXT HITS REPORT within an EDIT session, which might be further customized and stored into a user specified data set.
- Immediate
- Indicate that the FindText command is immediately executed without producing a report. A subsequent RFIND command can be used to find the next occurrence of the specified string.
Usage notes
- When all parameters are omitted, or when option Report is in effect,
a complete menu is displayed to specify them. For an illustration
of the menu, see the following figure:
-DSC- MSL Text Search Settings COMMAND ===> More: Specify string to search within the MSL members SEARCH string ===> mode ===> N W (Word) or M (Mask) or N (Normal) WITH string ===> mode ===> N W (Word) or M (Mask) or N (Normal) WITHOUT string ===> mode ===> N W (Word) or M (Mask) or N (Normal) Specify search range in target data records: START COLUMN ===> 1 END COLUMN ===> 99999 Specify how many members to process before being prompted to resume: STOP AFTER ===> 10 Number of members to process successfully PROMPT AFTER ===> 10 Number of members to process before a prompt Specify Y (Yes) or N (No) for the following options: AUTOMATIC ===> Y Process until reaches success limit? EXCLUDE ===> N Exclude mismatched members from displayed list? PACKED DATA ===> N Expand ISPF packed data format? FIND PROMPT ===> Y Prompt with FIND command upon selecting an member? FULL REPORT ===> Y Report all found records with multiple search criteria? DETAILED ===> N Break down by search criteria? Press ENTER for more search criteria or the END key to cancel Note: use " (double quote) to search for ' (single quote) characters Note: use C'... or c'... for case sensitive search strings use X'... or x'... for hexadecimal search strings Note: use * for a pattern mask "any character string or none" indicator use % for a pattern mask "any single character" indicator
- To set the default options, use command
SET GLOBAL
. - When keyword Report or Immediate is explicitly specified, it becomes the default setting until it is explicitly switched to the other option.
- Hexadecimal notations or blanks between quotation marks are unacceptable.
- The search starts from the first MSL entry that is displayed on the screen. The start column and end column numbers can be specified at the FindText command prompt menu.
Examples
TEXTFIND
- Displays a menu to specify search parameters.
FT 'JOB 1' LAST
- Searches from the last member to find the members that contain
the string
JOB 1
. FT NAME WORD
- Finds the members that contain the word
NAME
. FT NAME WORD R
- Displays a menu to specify search parameters for the word
NAME
. FT "x'aBc'Y"
- Finds the members that contain the string
X'ABC'Y
. TF X'81ab93'
- Finds the members that contain the 3-byte hexadecimal value x'81AB93'.
FT c'Mike' l w
- Searches from the last member to find the members that contain
the case-sensitive word
Mike
. FT %ABC*XYZ%1%2 M
- Finds the members that contain a string that matches the pattern
mask
%ABC*XYZ%1%2
.