Skip to main content
Moderne OnlyThis recipe is proprietary to Moderne and runs on the Moderne platform or CLI — it isn’t part of the open-source catalog. Available with a Moderne subscription.Contact Sales

Find components and identifiers by name

Recipe IDio.moderne.mainframe.inventory.FindNames
Artifactio.moderne.recipe:recipes-mainframe

Report every program, copybook, JCL member, control card, data set, BMS map set and map, Control-M schedule, group and calendar, assembler member, macro library member, SAS program, DDL member, link-edit deck, module listing, load module, table, plan, package, DBRM, IMS database, segment, PSB and transaction, MFS format and message, data name, paragraph, section, control section, field and macro whose name matches, and mark each where it is declared. One name is often several things — a program to COBOL, a member to JCL, a MEMNAME to Control-M — and each is a row of its own type, placed in the library member it lives in so that two of a name in different libraries are told apart. A data name is placed in the copybook that declares it where one does, with how often the program names it, so a field nothing refers to can be left out of a search.

Single recipeOpenRewriteModerne Proprietary License
Try in PlatformTry this recipe in the Moderne platform. Not a user yet? You’ll get a no-setup demo environment, with nothing to install or configure.

Options​

1 parameters
1 required
ParameterExampleTypeRequired
searchTermCA-CUST*StringRequired
The name to look for, matched against the whole name without regard to case. * stands for any run of characters and ? for any one, anywhere in the name.

Usage​

Run this recipe

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindNames --recipe-option "searchTerm=CA-CUST*"

If the recipe is not available locally, then you can install it using:

RELEASE resolves to the newest release and LATEST to the newest build of any kind, including snapshots. Either one lets mod config recipes upgrade pull in later versions without editing this command; a pinned version stays where you put it.

mod config recipes jar install io.moderne.recipe:recipes-mainframe:RELEASE

Data tables​

Component index
io.moderne.mainframe.analysis.table.ComponentIndex

Every component of the portfolio by name and type, with the library member it lives in.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ComponentIndex
ColumnDescription
NameThe name the portfolio knows the component by: the PROGRAM-ID of a program, the member name of a copybook, JCL member, control card, DDL, link-edit, assembler, macro, SAS, CLIST, REXX, listing or documentation member, the data set name, the map set or map name, the MEMNAME of a Control-M schedule and the group and calendar it names, the simple name of a Java class, and the name a member writes down for a load module, a table, a plan, a package, a DBRM, an IMS database, segment, PSB or transaction, and an MFS format or message.
Component typePROGRAM, COPYBOOK, JCL_JOB, JCL_PROC, JCL_INCLUDE for a JCL member that is neither a job nor a procedure, CONTROL_CARD, DATA_SET, BMS_MAPSET, BMS_MAP, CONTROL_M_SCHEDULE, CONTROL_M_GROUP, CONTROL_M_CALENDAR, ASSEMBLER, MACRO for a macro library member, SAS_PROGRAM, CLIST, REXX_EXEC, C_PROGRAM, PLI_PROGRAM, one of DOCJOB, DOCPGM, DOCFICH, DOCAPPL and DOCOPER for a run book member, said the way the member's own first word says it, LINKEDIT, LOAD_MODULE, MODULE_LISTING, DDL, SQL_TABLE, BINDPLAN, BINDPACKAGE, DBRM, IMS_DATABASE, IMS_SEGMENT, IMS_PSB, IMS_TRANSACTION, MFS_FORMAT, MFS_MAP or JAVA_CLASS. One name is often several of these.
Source pathThe file the component is in, which for a name a member writes down is the file that declares it. A data set has no source of its own and is placed in the IDCAMS deck that defines it, or in the first member whose DD names it.
Qualified nameThe component as a library member, LIB.RARY(MEMBER): the file's folders joined with dots and its name without the extension, upper-cased. Two members of one name in different libraries are told apart by this. A component with no file of its own — a data set, a load module, a table, a plan, a segment — is its own qualified name, and a Java class its fully qualified name.
PlatformThe folder above the application, which a repository laid out as <platform>/<application>/<library>/<member> names. Empty where the path is not that deep.
ApplicationThe folder above the library the member is in, which a repository laid out as <application>/<library>/<member> names. Empty where the member is in a top-level library.
Size in linesThe lines in the file, or 0 for a component with no file of its own.
Identifier index
io.moderne.mainframe.analysis.table.IdentifierIndex

Every data name, paragraph, section, control section, field and macro a program declares, with where it is declared and how often the program names it.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.IdentifierIndex
ColumnDescription
NameThe data name, paragraph name or section name, as written where it is declared.
KindDATA_NAME, PARAGRAPH or SECTION for COBOL; CONTROL_SECTION, FIELD or MACRO for assembler and SAS. A condition name is a data name.
ProgramThe program the identifier belongs to, which for an assembler or SAS member is the member name. A field copied in from a copybook is a different field in every program that copies it, with a usage count of its own.
CopybookThe copybook that declares it, or empty where the program declares it itself.
Source pathThe file the declaration is in: the copybook where it was copied in, the program otherwise.
LineThe line of the declaration within the source path, counted from 1, or 0 where it could not be placed.
Usage countHow many places in the program name it. A condition name has no storage of its own, so setting or testing it counts for the item it qualifies as well; a name in an EXEC CICS option or a :HOST-VARIABLE counts too. For a paragraph or section, the PERFORM, GO TO and ALTER statements naming it. An assembler or SAS symbol is counted by how often the member writes the word, since an assembler symbol is reached by naming it and nothing else.
Defined but unreferencedWhether nothing in the program names it. It may still move with a record that contains it, or run by falling through from the paragraph above: FindDeadData and FindUnreachableProcedures say whether it is dead.
Source files that had results
org.openrewrite.table.SourcesFileResults

Source files that were modified by the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileResults
ColumnDescription
Source path before the runThe source path of the file before the run. null when a source file was created during the run.
Source path after the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
Parent of the recipe that made changesIn a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all.
Recipe that made changesThe specific recipe that made a change.
Estimated time savingAn estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds.
CycleThe recipe cycle in which the change was made.
Source files that had search results
org.openrewrite.table.SearchResults

Search results that were found during the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SearchResults
ColumnDescription
Source path of search result before the runThe source path of the file with the search result markers present.
Source path of search result after run the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
ResultThe trimmed printed tree of the LST element that the marker is attached to.
DescriptionThe content of the description of the marker.
Recipe that added the search markerThe specific recipe that added the Search marker.
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrors

The details of all errors produced by a recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileErrors
ColumnDescription
Source pathThe file that failed to parse.
Recipe that made changesThe specific recipe that made a change.
Stack traceThe stack trace of the failure.
Recipe performance
org.openrewrite.table.RecipeRunStats

Statistics used in analyzing the performance of recipes.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.RecipeRunStats
ColumnDescription
The recipeThe recipe whose stats are being measured both individually and cumulatively.
Source file countThe number of source files the recipe ran over.
Source file changed countThe number of source files which were changed in the recipe run. Includes files created, deleted, and edited.
Cumulative scanning time (ns)The total time spent across the scanning phase of this recipe.
Max scanning time (ns)The max time scanning any one source file.
Cumulative edit time (ns)The total time spent across the editing phase of this recipe.
Max edit time (ns)The max time editing any one source file.