HP Search/XL User's Guide

1-7
2 Introducing HP Search
HP Search is a general-purpose search utility that enables you to look for words or patterns in individual
files or in sets of files.
With HP Search you can:
Search for your patterns in the following types of files:
COBOL-numbered.
Standard-numbered ASCII.
Unnumbered ASCII.
Commercial SPOOL files.
KSAM ASCII.
Look for up to 16 patterns in up to 65,536 different files during a single search.
Specify the file and pattern parameters for your search on the HP Search command line, be prompted
for them, or specify them by a combination of both methods.
Use indirect files to specify frequently used sets of files and patterns.
Use MPE LISTF wildcards to specify multiple files be searched.
Redirect components of the HP Search output to permanent files.
Get quick, complete, online help.
The HP Search Command Interface
HP Search provides two ways for you to specify the file names and patterns of a particular search. You can
supply the entire set of search parameters on the HP Search command line or enter them one at a time at
the prompts. The syntax for the command line search specification is shown below.
HPSEARCH "[filenames ] [FOR patterns ] [WITH options ]"
An example of an HP Search command is shown below.
:HPSEARCH "@.SOURCE FOR FREADDIR FWRITEDIR WITH USECASE"
If you type HPSEARCH at the MPE prompt but do not give specifications for file names or patterns, HP
Search will prompt you for them. However, if you do not specify which search options you want to use, you
are not prompted for them; the default options are used. You can only specify search options on the HP
Search command line following the WITH keyword.
If you specify a file on the command line, HP Search does not prompt you for additional files to search.
Likewise, if you specify a pattern on the command line following the FOR keyword, HP Search does not
prompt you for additional patterns. Two examples of HP Search prompting are discussed below.
Prompting for Files
To respond to an HP Search prompt for files, enter a file name and press Return. When you have finished
specifying files, press only Return. For help specifying files to search, enter "help" or "?" at the prompt and
HP Search displays help screens explaining how to specify files.