Option Parameters [ HP Search/XL User's Guide ] MPE/iX 5.0 Documentation
HP Search/XL User's Guide
Option Parameters
You may specify options on the command line which affect the way HP
Search looks for patterns, the format of its output, and the destination
of this output. Any parameters listed in the HP Search command line
after WITH are treated as option specifiers.
Option parameters may be specified in any order but must be delimited
with blank spaces or commas. Also, some options accept arguments which
must be placed immediately following their options. If an option is
specified more than once, or if contradictory options are specified, HP
Search recognizes only the first option.
What the HP Search Options Specify
You can specify up to ten different options each time HP Search is
executed. These options are shown below in Table 3-3. For each option
this table shows syntax, indicates whether it has or is a default value,
and describes what HP Search does when you specify it.
Table 3-3. HP Search Option Parameters
-------------------------------------------------------------------------------------------
| |
| Option Syntax Default? Description |
| |
-------------------------------------------------------------------------------------------
| |
| LIST filename [REPLACE] SRCHLIST Indicates that HP Search output |
| should go to the file filename. |
| |
| MATCHLOG filename [REPLACE] SRCHMTCH Indicates that a list of the files |
| containing search matches should |
| go to the file filename. |
| |
| PATTERNLOG filename [REPLACE] SRCHPAT Indicates that a list of the |
| patterns specified should be |
| output to the file filename. |
| |
| SEARCHLOG filename [REPLACE] SRCHLOG Indicates that the list of files |
| searched should be output to |
| filename. |
| |
-------------------------------------------------------------------------------------------
| |
| COUNT Print only the names of the files |
| containing a match and how many |
| matches were found in each. |
| |
| NOCOUNT x Print all lines containing |
| matches. |
| |
-------------------------------------------------------------------------------------------
| |
| DOTS Indicate progress by printing a |
| period (dot) for every file |
| searched. |
| |
| NODOTS x Do not print dots. |
| |
-------------------------------------------------------------------------------------------
HP Search Option Parameters(cont.)
-------------------------------------------------------------------------------------------
| |
| Option Syntax Default? Description |
| |
-------------------------------------------------------------------------------------------
| |
| INDEX Update and use the block indexing |
| file SRCHnnn.PUB to increase the |
| speed of searches. |
| |
| NOINDEX x Do not update the block indexing |
| file. |
| |
-------------------------------------------------------------------------------------------
| |
| NUM x Print line numbers to the left of |
| the matching lines. |
| |
| UNN Do not print lines numbers. |
| |
-------------------------------------------------------------------------------------------
| |
| QUIET Prevent search output from going |
| to $STDLIST. (This is usually the |
| terminal.) |
| |
| NOQUIET x Send search output to $STDLIST. |
| |
-------------------------------------------------------------------------------------------
| |
| USECASE Search the specified patterns with |
| case-sensitivity. |
| |
| IGNORECASE x Search the specified patterns |
| without regard to the case of the |
| characters. |
| |
-------------------------------------------------------------------------------------------
Output File Options
By default, HP Search automatically creates four temporary files every
time you run it. These files contain information specific to the last
search executed and are overwritten each new execution of HP Search.
Four options are available to redirect this information to permanent
files instead (see Table 3-4 below).
Table 3-4. Temporary Files Automatically Created by HP Search
-----------------------------------------------------------------------------------------------
| | | |
| File Name | File Contents | Option to Use to |
| | | Change File Name |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SRCHLIST | Contains all output from the search. | LIST |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SRCHPAT | Contains a list of all the patterns used in | PATTERNLOG |
| | the search. | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SRCHLOG | Contains a list of all files searched. | SEARCHLOG |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| SRCHMTCH | Contains a list of all files that had a | MATCHLOG |
| | match. | |
| | | |
-----------------------------------------------------------------------------------------------
If you do not specify the optional "REPLACE" argument for these options,
HP Search prompts you before it overwrites an existing permanent file.
If you do specify the "REPLACE" argument, HP Search does not prompt you
before overwriting an existing permanent file. File equations are used
if they exist for the specified file name.
When using any of these options, the file is replaced before the search
begins. You cannot use any of the files specified in these options as an
indirect file also, because the file would be replaced before it was
processed.
LIST <filename> [REPLACE]. Use this option to direct terminal screen
output to the file specified by the filename argument. If you do not
specify the LIST option, this output goes to the temporary file
"SRCHLIST". Specifying this option does not suppress output to your
terminal; use the QUIET option for that.
MATCHLOG <filename> [REPLACE]. Use this option to save the list of files
containing matches to a permanent file rather than the temporary file
"SRCHMTCH". In this output file as in SRCHMTCH, the file names are
listed fully-qualified, one file per line.
PATTERNLOG <filename> [REPLACE]. Use this option to save the list of
patterns specified to a permanent file rather than the temporary file
"SRCHPAT". The patterns contained in your permanent file are listed one
per line with each line starting in column one.
SEARCHLOG <filename> [REPLACE]. Use this option to save the list of
files searched to a permanent file rather than the temporary file
"SRCHLOG". The file names are listed fully-qualified, one per line.
Other Options
The remaining options can be divided into two groups: those that change
the search process and those that change the format of the screen output.
When you specify any of these options, you make a yes/no decision about a
particular HP Search feature.
COUNT/NOCOUNT. Use COUNT to have HP Search print only the names of the
files containing matches and how many matches were found in each.
Otherwise, the default value NOCOUNT is assumed and all lines containing
a match are printed.
DOTS/NODOTS. Specify the DOTS option if you want HP Search to show its
search progress by printing a period as it searches each file. NODOTS is
the default value.
INDEX/NOINDEX. Use the INDEX option to have HP Search update the block
indexing file if necessary and to use it to shorten the search time of
later searches. The first search on a file with the INDEX option does
not run any faster (or slower) than without this indexing, however HP
Search starts a batch job to update the indexing file. After indexing, a
file can be searched noticeably faster for most patterns as long as the
file does not change. Modified files are reindexed along with
newly-created files. The default value is NOINDEX.
NUM/UNN. Use the NUM option to have HP Search display line numbers to
the left of matching lines. The default value is NUM.
Use the UNN option to specify that no line numbers should be displayed to
the left of matching lines. This means that the matching text will be
output in the same column positions it occupies in the files you
searched. For COBOL-numbered files, HP Search prints sequence numbers
unformatted in the first six columns if you specify UNN. Matching lines
from standard numbered files will have their sequence numbers printed at
the end of the line.
QUIET/NOQUIET. Use the QUIET option to specify that no output goes to
$STDLIST (this is usually your terminal). Even when you specify QUIET on
the HP Search command line, output still goes to the file SRCHLIST in the
temporary file domain or a permanent output file specified in the LIST
option.
The default value is NOQUIET. Use this option to direct HP Search output
to $STDLIST.
USECASE/IGNORECASE. Specify the USECASE option to have HP Search look
for your patterns with case-sensitivity. That is, HP Search considers
the uppercase and lowercase of a letter as different characters.
The default value is IGNORECASE. Specifying this indicates that you want
HP Search to match corresponding uppercase and lowercase letters.
MPE/iX 5.0 Documentation