PCA$HELP.HLB  —  SEARCH
    PCA Command

    Searches the source code for a specified string, then displays
    the source line or lines containing an occurrence of that string
    in the output window.

    Format

      SEARCH  [range] [string]

1  –  Parameters

 range

    Defines the boundaries of the search. If you do not specify
    a range, the SEARCH command searches the module most recently
    referenced with a SEARCH or TYPE command, from the line following
    the last line displayed to the end of the module. PCA can search
    only one module at a time. These boundaries may be defined with
    any of the following formats:

    modname                             Searches the entire specified
                                        module.
    [modname\]line-number               Searches the specified module
                                        from the specified line
                                        number to the end of the
                                        module.
    [modname\]line-number:line-number   Searches the inclusive
                                        interval between the two
                                        line numbers of the specified
                                        module.

 string

    Specifies the sequence of characters to search for in the source.
    If you do not specify a string, then the most recently specified
    search string is used. If the string contains spaces, tabs,
    commas or parentheses, then it must be delimited by either
    double or single quotation marks. If the string delimited by
    quotation marks has a quotation mark within it, the enclosed
    quotation mark must be expressed as two consecutive quotation
    marks (i.e. If the string delimited by single quotation marks
    has a single quote within it, the enclosed single quote must be
    expressed as two consecutive single quotes (e.g. '')). The search
    is case sensitive depending on the currently set language. If the
    string is not delimited, then the default range parameter must
    not be used and the string may not contain any blanks, tabs or
    semicolons.

2  –  Description

    The SEARCH command allows you to search your source code for
    a specified string. The source line or lines containing an
    occurrence of that string are then displayed. You can use the
    SEARCH and TYPE commands to display specific lines, or a range
    of lines. However, if you have moved your source files, then you
    must establish a source directory search list with the SET SOURCE
    command in order to use these commands.

3  –  Qualifiers

3.1    /ALL

    Searches the specified range for all occurrences of the string
    and display every line containing the string.

3.2    /NEXT

    Searches the specified range for the first occurrence of the
    string and display that line. This is the default.

3.3    /IDENTIFIER

    Names the string as an identifier. The specified range is
    searched for the first occurrence of this identifier. If the
    string (identifier) is bound on either side by a character that
    can be part of an identifier defined by the SET LANGUAGE command,
    then it is not displayed. The search continues until it finds an
    occurrence of the string that is not bound by such characters.

3.4    /STRING

    Searches the specified range for an occurrence of the string
    without interpreting the context surrounding the string. This is
    the default.

4  –  Examples

  PCAC> SEARCH/STRING/ALL COBOLTEST "D" 40:50
  40: 02    D2N    COMP-2 VALUE -234560000000
  41: 02    D      COMP-2 VALUE  222222.33
  47: 02    DRO    COMP-2 VALUE  0.1
  50: 02    DR5    COMP-2 VALUE  0.000001

      This command searches for all occurrences of the letter D in
      lines 40 through 50 of the module COBOLTEST, and displays the
      result.
Close Help