Find matching identifiers in COBOL, copybooks, and JCL
Recipe ID
org.openrewrite.mainframe.cobol.search.FindReferenceArtifactorg.openrewrite:rewrite-mainframeFinds an identifier by an exact match or regex pattern in COBOL, copybooks, and/or JCL.
Single recipeMSAL
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.mainframe.cobol.search.FindReference --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-mainframe:RELEASEOptions
| Name | Type | Description |
|---|---|---|
searchTermrequired | String | A word or regex pattern to find. By default the search term is case insensitive. e.g. CM102M or cm1.* |
exactMatchrequired | Boolean | Search for a word based on an exact match of the search term. e.g. true |
Data tables
Structured output this recipe can produce.
- COBOL reference search resultsIdentifier references found in COBOL, copybook, and JCL sources.
org.openrewrite.mainframe.cobol.table.ReferenceSearchResult - 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