Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
FIND—Find a Search String z/OS ISPF Edit and Edit Macros SC19-3621-00 |
|
The FIND macro command locates one or more occurrences of a search string. SyntaxMacro command syntax .-.ZFIRST--.ZLAST-. .-NEXT--. >>-ISREDIT--+-FIND-+--string--+-----------------+--+-------+----> '-F----' '-labela--labelb--' +-ALL---+ +-FIRST-+ +-LAST--+ '-PREV--' .-CHARS--. >--+--------+--+----+--+---------------------+----------------->< +-PREFIX-+ +-X--+ +-start_col-----------+ +-SUFFIX-+ '-NX-' '-left_col--right_col-' '-WORD---'
Note: For more information
about restricting the search to only a portion of each line, see Limiting the search to specified columns.
DescriptionUse the SEEK macro command instead of FIND if you want to locate a string without changing the exclude status of the line that contains the string. You can use FIND with the EXCLUDE and CHANGE commands to find a search string, change it, and then exclude the line that contains the string from the panel. To find the
next occurrence of the letters ELSE without specifying
any other qualifications, include this line in an edit macro:
Since
no other qualifications were specified, the letters ELSE can
be:
This type of search is called a character string search (note the C that precedes the search string) because it finds the next occurrence of the letters ELSE only if the letters are in uppercase. However, since no other qualifications were specified, the letters can be found anywhere in the data set or member, as outlined in the preceding list. For more information, including other types of search strings, see Finding, seeking, changing, and excluding data. Return codes
ExamplesThe example shown here finds the
first occurrence in the data set of the letters ELSE.
However, the letters must occur on or between lines labeled .E and
.S and they must be the first four letters of a word:
The
example shown here finds the last occurrence in the data set of the
letters ELSE. However, the letters must occur on
or between lines labeled .E and .S; they must be the last four letters
of a word; and they must be found in an excluded line.
The
example shown here finds the first occurrence of the letters ELSE that
immediately precedes the cursor position. However, the cursor must
not be positioned ahead of the lines labeled .E and .S. Also, the
letters must occur on or between lines labeled .E and .S; they must
be standalone characters (not part of any other word); they must be
found in a non-excluded line; and they must exist within columns 1
and 5:
|
Copyright IBM Corporation 1990, 2014
|