Index the portfolio's components and identifiers
io.moderne.mainframe.prethink.AnalyzeInventoryio.moderne.recipe:recipes-mainframeUsage
Run this recipe
This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.
You will need to have configured the Moderne CLI on your machine before you can run the following command.
mod run . --recipe AnalyzeInventory
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.
- RELEASE
- LATEST
- Pinned version
mod config recipes jar install io.moderne.recipe:recipes-mainframe:RELEASE
mod config recipes jar install io.moderne.recipe:recipes-mainframe:LATEST
mod config recipes jar install io.moderne.recipe:recipes-mainframe:0.1.0
Data tables
Component index
io.moderne.mainframe.analysis.table.ComponentIndexEvery component of the portfolio by name and type, with the library member it lives in.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ComponentIndex
| Column | Description |
|---|---|
| Name | The 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 type | PROGRAM, 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 path | The 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 name | The 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. |
| Platform | The folder above the application, which a repository laid out as <platform>/<application>/<library>/<member> names. Empty where the path is not that deep. |
| Application | The 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 lines | The lines in the file, or 0 for a component with no file of its own. |
Identifier index
io.moderne.mainframe.analysis.table.IdentifierIndexEvery data name, paragraph, section, control section, field and macro a program declares, with where it is declared and how often the program names it.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.IdentifierIndex
| Column | Description |
|---|---|
| Name | The data name, paragraph name or section name, as written where it is declared. |
| Kind | DATA_NAME, PARAGRAPH or SECTION for COBOL; CONTROL_SECTION, FIELD or MACRO for assembler and SAS. A condition name is a data name. |
| Program | The 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. |
| Copybook | The copybook that declares it, or empty where the program declares it itself. |
| Source path | The file the declaration is in: the copybook where it was copied in, the program otherwise. |
| Line | The line of the declaration within the source path, counted from 1, or 0 where it could not be placed. |
| Usage count | How 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 unreferenced | Whether 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.SourcesFileResultsSource files that were modified by the recipe run.
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileResults
| Column | Description |
|---|---|
| Source path before the run | The source path of the file before the run. null when a source file was created during the run. |
| Source path after the run | A 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 changes | In 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 changes | The specific recipe that made a change. |
| Estimated time saving | An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds. |
| Cycle | The recipe cycle in which the change was made. |
Source files that had search results
org.openrewrite.table.SearchResultsSearch results that were found during the recipe run.
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SearchResults
| Column | Description |
|---|---|
| Source path of search result before the run | The source path of the file with the search result markers present. |
| Source path of search result after run the run | A recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run. |
| Result | The trimmed printed tree of the LST element that the marker is attached to. |
| Description | The content of the description of the marker. |
| Recipe that added the search marker | The specific recipe that added the Search marker. |
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrorsThe details of all errors produced by a recipe run.
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileErrors
| Column | Description |
|---|---|
| Source path | The file that failed to parse. |
| Recipe that made changes | The specific recipe that made a change. |
| Stack trace | The stack trace of the failure. |
Recipe performance
org.openrewrite.table.RecipeRunStatsStatistics used in analyzing the performance of recipes.
mod study . --last-recipe-run \
--data-table org.openrewrite.table.RecipeRunStats
| Column | Description |
|---|---|
| The recipe | The recipe whose stats are being measured both individually and cumulatively. |
| Source file count | The number of source files the recipe ran over. |
| Source file changed count | The 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. |