Using Construct Lists to Narrow a Code Search

Once you have generated a construct list in Code Search, you can use the list itself as a condition of a search. That is, you can use the search results to refine a subsequent search.

Suppose you have performed a Code Search for duplicate paragraphs in COBOL programs, storing the results in a list called Matched Paragraphs in the General category/folder. The next step might be to refine the search. The following example shows how you might use a Code Search list of duplicate paragraphs as a condition of the search:

  1. Select a list, then click Advanced Search on the toolbar. This opens the Search dialog box.
  2. In the Search List, choose the type of object you want to execute the search against.
  3. In the General tab, select a folder for the new criterion to be added to, then click New Criterion New Criterion Button on the toolbar. This opens the New Criterion dialog box.
  4. In the text field, type a descriptive name for new criterion and then click OK. Interactive Analysis creates the new criterion in the selected folder.
  5. Click the Declaration link in the Criterion pane of the Search dialog box.
  6. Select the declaration type required from the available list.
  7. You can extend this initial search criterion by click a combination of Add entity and Add child element to build a complex search criterion that can include specifying relationships, object types, containing specified attributes which can conform to specified search strings and patterns that can use wildcards.
  8. Once you have constructed the criterion that you require you can execute the search. Click either List Sources Only or Find All Constructs, depending on your requirements. Interactive Analysis displays a dialog box with the results of the search operation. Click OK. The Search window is closed and the results of the search are displayed in the Code Search tab.

    See Specifying a Search Criterion for more information on building search criterion.