FIND parameter-string col-delimiter indicator limit-parameter
where parameter-string represents one of the parameters described in this list.
Searches for the same string used when you last issued the FIND command
Example: FIND *
Note: FIND * is functionally equivalent to the RFIND command described later in this chapter.
Searches for a string that includes special characters or blanks
Enclose the text string in either single or double quotation marks.
Example: FIND "go to"
The example, FIND '*', finds an asterisk.
Searches for a string of hexadecimal characters enclosed in single or double quotation marks
Example: FIND X'00'
Specify only hexadecimal characters (0–9 and A–F), and specify an even number of characters.
Specify the hexadecimal identifier X before or after the hexadecimal string of characters (enclosed in quotation marks).
Example: FIND "FFFF"X
Searches for a character or string represented by one or more of the following placeholders:
any single character
alphabetic characters
numeric characters
special characters
non-blank characters
invalid display characters
non-numeric characters
lowercase alphabetic characters
uppercase alphabetic characters
Specify the picture string identifier P before or after the picture string of characters (enclosed in quotation marks).
Examples:
FIND P'.' Finds any invalid display character
FIND P'###' Finds 3-digit numbers, but not A23
FIND '@1'P Finds A1, B1, but not A2, B3, and so on
Represents a text string that is not case-sensitive
You can specify the text string identifier T before or after a text string of characters (enclosed in quotation marks).
Example:
FIND T'Total'
Finds the text strings TOTAL, Total, and total, and TOTALS, Totals, and totals, and so on
You can omit the text string identifier T as shown in the example. This version of the FIND command works the same as the simple FIND command. (FIND T'This' and FIND This are functionally the same.)
This version of FIND disregards case as it performs the search, The result is that 'This', 'THIS', and 'this' are treated the same.
A case-sensitive text string
You can specify the text string identifier C before or after the text string of characters (enclosed in quotation marks).
This version of FIND performs a search that recognizes the differences in case. The result is that 'This', 'THIS', and 'this' are treated as three different text strings.
Example:
FIND C'Total' Finds only the text strings Total and Totals, but not TOTAL, total, TOTALS, totals
Where col-delimiter (in the preceding syntax) represents a single column or a set of optional columns to search for a text string:
The following results are achieved depending on how you specify column numbers.
Searches every complete record in the member
Example:
FIND DATE Finds all instances of 'DATE' in all records
Searches only that single column in the member
Example:
FIND P'=@1' 1
Finds labels .A1, .B1, .C1, and so on, in the first column of every record
Searches only those columns in the member between those you specified (inclusive)
Example:
FIND '.'P 73 80
Finds invalid characters only in columns 73–80
Where indicator (in the preceding syntax) represents an optional navigation and restriction parameter that allows you to specify the direction to search or restrict the number of instances you want to find. These parameters are summarized in this table.
Finds the next instance of the text string you specify, either from the current cursor position (if the cursor is shown in the contents of a member) or from the top of the member (if the cursor is not shown in the contents of a member)
Example: FIND A365 NEXT
You do not have to specify NEXT, because text is searched in this direction by default.
Finds the previous instance of the text string you specify based on the cursor:
Example: FIND 2365 PREV
Finds the first instance of the specified text string, searching:
Example:
FIND P'.' 73 80 FIRST
Finds the first instance of an invalid display character between columns 73 and 80
Finds the last instance of the text string you specify, from the last record in a member until the text string is found, or until the first record in the member is reached
Example:
FIND '.'P LAST Finds the last instance of an invalid display character anywhere
Finds all instances of the text string you specify, from the first record in a member until all text strings are found, or until the last record is reached
Example:
FIND '.'P ALL Finds all instances of an invalid display character in all columns
If more than one instance of the text string you specify is found, the total number is displayed, the first text string found is highlighted, and the cursor is placed on its first character.
Where limit-parameter represents an optional parameter that allows you to restrict a search to only specific characters at the beginning or end of a word, any characters within a word, or only a complete word, as summarized in the following list.
Searches for any instance of a text string within a word
Example:
FIND DO CHARS
Finds DO, DON'T ADO, ADOPT, 'DO', (DON'T), and ADO
Searches for specific instances of a text string at the beginning of a word only
Example:
FIND DO PREFIX
Finds only DO, DON'T, 'DO', and (DON'T), but not ADO, ADOPT, and ADO
Searches for specific instances of a text string at the end of a word only
Example:
FIND DO SUFFIX
Finds only ADO, 'DO', and ADO-, but not DO, DON'T, ADOPT, and (DON'T)
Searches for a complete word only
Example:
FIND DO WORD
Finds only DO and 'DO', but not DON'T, ADO, ADOPT, (DON'T), and ADO-
Copyright © 2013 CA.
All rights reserved.
|
|