Find the plans and packages the bind decks declare
io.moderne.mainframe.db2.FindBindChainio.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 FindBindChain
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
DB2 bind chain
io.moderne.mainframe.analysis.table.Db2BindChainWhat each bind card declares, one row per plan or package it names: the deck it is written in, the job that runs that deck, the collection the package lands in, the DBRM it is bound from and the program that DBRM was precompiled from. The deck is the only place the chain from a plan to the program that runs under it is written down — neither the COBOL nor the JCL says any of it.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.Db2BindChain
| Column | Description |
|---|---|
| Deck | The member the deck is: a bind library member under its own name, or the job the deck is written in the stream of. |
| Deck path | The file the card was written in. |
| Line | The one-based line of that file the subcommand begins on, counting from the top of the job for a deck written in-stream. |
| Command | BIND where the card makes the object, REBIND where it names one that already exists. Only a BIND says what an object is bound from. |
| Binds | Whether the card binds a PLAN or a PACKAGE. |
| Plan | The plan, empty for a package bind. A plan is what a batch step names in RUN PROGRAM(...) PLAN(...) and what the CICS resource definition names. |
| Collection | The collection the packages are bound into, empty for a plan bind. This is the name an environment varies: the same deck binds into another collection on another subsystem. |
| Package | The package, empty for a plan bind. * where a REBIND names every package of the collection rather than one. |
| DBRM | The DBRM member the package is bound from, from MEMBER. Empty for a plan bind and for a REBIND, which is bound from whatever it was bound from before. |
| Program | The program the DBRM was precompiled from. A DB2 precompile writes the DBRM under the program's own name, so the DBRM member, the package and the program are the same word — this is the join from a plan to the code that runs under it. |
| Program path | The program's file, empty where no program of that name was read. A bind for a program nobody supplied is how a gap in an ingestion shows. |
| Package list | The packages a plan may run, from PKLIST, as written: an entry names a collection and either one package or * for all of them. Empty for a package bind. |
| Qualifier | What unqualified table names in the package resolve to. This is the schema the SQL in the program actually reads, which the program never names. |
| Owner | The authorization identifier the object is owned by. |
| Job | The job whose step runs this deck, empty where no job read here does. A deck run by two jobs has a row for each. |
| Step | The step of that job, which is where the bind is placed among the compiles. |
DB2 package plans
io.moderne.mainframe.analysis.table.Db2PackagePlansThe bind chain read from the package's side: which plans may run each package, and so which plans a change to the program behind it is felt under. A plan lists either the package outright or the whole collection with *, so the plans a package runs under are written down nowhere one name at a time.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.Db2PackagePlans
| Column | Description |
|---|---|
| Collection | The collection the package is bound into. |
| Package | The package. |
| Program | The program the package is bound from, which is the DBRM member of the same name. Empty where no bind read here says what the package holds. |
| Plan | A plan that may run the package. Empty where none read here lists it. |
| Listed as | PACKAGE where the plan's PKLIST names the package outright, COLLECTION where it names the collection with * and so picks up every package bound into it, NOT_LISTED where no plan reaches it. |
| Package deck | The deck the package is bound in. |
| Plan deck | The deck the plan is bound in, which is often not the one the package is bound in. |
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. |