HP Search/XL User's Guide

2- 12
and the way search output is displayed and saved. These options are described in detail in the "Option
Parameters" section of the Specifying Parameters chapter.
Options can only be specified on the HP Search command line. Any parameters listed in the command line
after WITH are treated as option specifiers. The examples below show how you can specify options on the
command line.
To specify options for HP Search, use one of these formats:
:HPSEARCH "WITH option1 option2..."
<HP Search prompts for file parameters>
<HP Search prompts for pattern parameters>
<Search Begins>
or
:
HPSEARCH "filename filename...WITH option..."
<HP Search prompts for pattern parameters>
<Search Begins>
or
:
HPSEARCH "FOR pattern...WITH option..."
<HP Search prompts for file parameters>
<Search Begins>
or
:
HPSEARCH "filename...FOR pattern...WITH option..."
<Search Begins>
Example Search Tasks
This section provides specific examples of HP Search tasks and shows how to accomplish them.
Searching One File for One Pattern
The following example searches a single file, named SALARY.SOURCE, for a single pattern, EMPLOYEE-
SSNO:
:HPSEARCH "SALARY.SOURCE FOR EMPLOYEE-SSNO"
Searching Several Files for One Pattern
HP Search allows you to use the same characters the MPE LISTF command allows to specify file names.
The following example searches all the files that begin with D in the group SOURCE for the pattern EMP-
HIRE-DATE:
:
HPSEARCH "D@.SOURCE FOR EMP-HIRE-DATE"
Searching One File for Several Patterns
The following example searches a single file , named PARSC, for the four patterns READ, WRITE, OPEN,
and CLOSE: