Download Print this page

HP 3000 Manual page 167

Mpe/ix computer systems, rpg/xl utilities
Hide thumbs Also See for 3000:

Advertisement

Form
F[IND] [E[VERY] ] "string" [IN lb[/le] ]
Parameter Explanation
E[VERY]
Every occurrence of the string is located in the given range. (If not specified, only the first
occurrence is located.)
"string"
Character or characters you wish to find. (Note that you may omit "string", and RISE will
default and use the previous "string" given with the last FIND command. However, you must
specify "string" once.)
IN
Notifies RISE that the next number or character will establish the range of the search for
"string".
lb
First or only line designated to be searched.
le
Line where the search ends.
Purpose
The purpose of the FIND command is to locate the first occurrence of a string. If "EVERY" is specified,
every occurrence of "string" will be located in the given range. If no range is given, RISE will search
starting from the line after the current record pointer through to the end of the file. If "EVERY" is omitted,
the command will list the first occurrence within the range. When you press "F" again, RISE will search
for the next occurrence within the range. Stepping through each located line in this manner allows you to
review it for any necessary modifications. When there is no occurrence of the string, RISE will print:
"string" not found
Delimiters: The delimiters around "string" may be any special character except the slash (/).
Execution mode: Line or Block.
Record pointer: At the line containing "string".
Examples
The following are legal abbreviations which may be used with the FIND command and its parameters:
FIN "STRING" IN
Search the entire file for the first occurrence of
A
"STRING".
time "F" is pressed until all are found.
F "STRING" IN
Find the first occurrences of "STRING" in a line range
10/50
beginning with line 10 and ending with line 50.
F EVERY
Search the entire file for all occurrences of "STRING"
"STRING" IN A
and list them at the terminal.
In the example, the TEXT command is used to copy SIMCAL into a work file, and lines 1 through 5 are
listed (1). The FIND command is used with the EVERY parameter to find the string "PUT", and all
occurrences of the string are listed (2). Next, FIND is again used with EVERY but this time the string is
not specified. The default string, "PUT", which was used with the last FIND command, is used again by
RISE, and the results are listed (3). An error is generated when an abbreviation of FIND cannot be
Each subsequent occurrence may be found each
2- 169

Advertisement

loading