Options
Usage
Run this recipe
You will need to have configured the Moderne CLI on your machine before you can run the following command.
mod run . --recipe AnalyzeVariableChain --recipe-option "variable=CLM-AMT-RESERVED"
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
Variable chain
io.moderne.mainframe.analysis.table.VariableChainOne row per way a variable reaches the scheduler: the copybook that declares it, the program that uses it, the load module the program is bound into, the procedure and job step that run that module, and the Control-M definition that submits the job. Six sources have to be joined to say what runs tonight if a field is widened, and each holds only its own link — the copybook does not know its programs, the program does not know its module, the module does not know its job, and the job does not say when it runs. A chain that stops short is reported as far as it got, so a field that reaches no batch job at all is a row and not a gap.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.VariableChain
| Column | Description |
|---|---|
| Variable | The variable, qualified by the records containing it. Two fields of a name in different records are different variables and each has its own chains. |
| Copybook | The copybook that declares it, or empty where the program declares it itself. A field copied in is one field to change and many to retest, which is what makes the rest of the row worth joining. |
| Source path | The file the declaration is in: the copybook where it was copied in, the program otherwise. Empty for a copybook no ingestion holds. |
| Program | The program that declares the variable, which is where a change to it is compiled. |
| Usage | READ, WRITTEN, BOTH, or UNUSED where the program declares the variable and never touches it. A chain through an unused field is a chain the change does not have to be tested along. |
| Load module | The module the program is bound into, from the link-edit deck that declares it or the listing that reports it. A subroutine is bound into every module that includes it and has a chain through each. Empty where nothing read says how the program is linked, and then the job is joined by the program's own name, which is what a step asks for. |
| Load library | The library the module is written to. It is what tells a batch module from a CICS one where both carry the program's name, and a module in a CICS library is why a chain stops here. |
| Procedure | The procedure the step is written in, empty for a step written in the job itself. A job read without its procedure library has no procedure steps to report, so the chain stops at the module rather than naming one. |
| Step | The step that runs the module, qualified by the step that called its procedure — EXTRACT.RUN — which is how a listing names it. |
| JCL member | The member the step is in, which is the file to open and the name the scheduler submits. Empty where no job read runs the module: an online program, or a batch one whose job was not supplied. |
| JCL path | The file that member was read from, empty where no job read runs the module. |
| JCL line | The one-based line of the step's EXEC card. A step a procedure supplies has no line in the job, so it is the calling EXEC card that is given — the line the job's reader has. |
| Schedule | The name the scheduler knows the job by. A member ordered under more than one table has a chain for each. Empty where no definition submits it, which is either a job run by hand or a schedule nobody exported. |
| Schedule table | The table the job is ordered in, which is what says when it runs. |
| Hops | How many of the six links the chain names — copybook, program, load module, procedure, job, schedule — so that a complete chain sorts above a chain that stopped. A step written in the job itself has no procedure, so six is not the only complete answer. |
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. |