← All recipes
Moderne licensed

Find matching words in the source code

Recipe IDorg.openrewrite.cobol.search.FindWord
Artifactorg.openrewrite:rewrite-cobol

Search for COBOL words based on a search term.

Single recipeMSAL

Usage

You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.cobol.search.FindWord --recipe-option "searchTerm=CM102M or cm1.*" --recipe-option "exactMatch=true"

If the recipe isn’t available locally, install it with:

mod config recipes jar install org.openrewrite:rewrite-cobol:2.20.3

Options

NameTypeDescription
searchTermrequiredStringA word or regex pattern to find. By default the search term is case insensitive.
e.g. CM102M or cm1.*
exactMatchrequiredBooleanSearch for a word based on an exact match of the search term.
e.g. true

Data tables

Structured output this recipe can produce.

  • COBOL word search resultsWords in COBOL source code that match the search criteria.org.openrewrite.cobol.table.WordSearchResult
  • Source files that had resultsSource files that were modified by the recipe run.org.openrewrite.table.SourcesFileResults
  • Source files that had search resultsSearch results that were found during the recipe run.org.openrewrite.table.SearchResults
  • Source files that errored on a recipeThe details of all errors produced by a recipe run.org.openrewrite.table.SourcesFileErrors
  • Recipe performanceStatistics used in analyzing the performance of recipes.org.openrewrite.table.RecipeRunStats