Analyze how the portfolio reaches its data
io.moderne.mainframe.prethink.AnalyzeDataAccessio.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 AnalyzeDataAccess
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
Resource CRUD matrix
io.moderne.mainframe.analysis.table.ResourceCrudWhich programs create, read, update and delete which files, queues, DB2 tables and IMS segments, across CICS, DL/I, SQL and native file I/O.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ResourceCrud
| Column | Description |
|---|---|
| Program | The COBOL program. |
| Paragraph | The paragraph or section containing the statement. |
| Resource kind | Whether the store is a file, a temporary storage or transient data queue, a DB2 table or an IMS segment. |
| Resource | The resource as the program names it. |
| External name | What the resource is called outside the program — the ASSIGN name for a native file. This is the column two programs have to agree on before they can be said to share a store. |
| CRUD | CREATE, READ, UPDATE or DELETE. |
| Operation | The statement as written. Two accesses that agree on CRUD can still differ in ways worth seeing. |
| Dynamic | Whether the resource name came from a data item rather than a literal. |
Batch CRUD matrix
io.moderne.mainframe.analysis.table.BatchCrudWhich job step runs which program against which data set, and what the program does with it.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.BatchCrud
| Column | Description |
|---|---|
| Job | The job name, empty for a member with no JOB card. |
| Member | The JCL member. |
| Step | The step name. An unnamed step is empty, and cannot be referred to by a later step or by a scheduler. |
| Step program | The program the step names on PGM=. |
| Program | The program that names the file. Not always the step's program: a subprogram opens the DDs of the step that runs its caller. |
| DD name | The DD name, which is the only word the JCL and the program both contain. |
| File | The file as the program names it, from SELECT. |
| Written in | The member that asked for the DD, where the program's own text does not — a SAS %INCLUDE reads another member in where the statement stands, so what that member needs the step has to allocate. Empty for a DD the program names itself. |
| Data set | The data set as the installation knows it, with any member. |
| Data set kind | Whether the DD names a catalogued data set, a generation, a library member, something temporary, in-stream data, DUMMY, SYSOUT, or a data set passed by an earlier step. |
| Disposition | The DISP operand as written. The status is what says whether the step expects the data set to exist. |
| CRUD | CREATE, READ, UPDATE or DELETE, empty where nothing is bound. |
| Operations | The statements the CRUD was read from. |
| Binding | How far the DD name and the ASSIGN clause got towards meeting. Anything other than BOUND is a gap between the JCL and the program, or a limit of what the sources read can say. |
CICS resource usages
io.moderne.mainframe.analysis.table.CicsResourceUsagesWhich CICS resources each program touches, and how.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.CicsResourceUsages
| Column | Description |
|---|---|
| Program | The COBOL program touching the resource. |
| Paragraph | The paragraph or section containing the command. |
| Resource kind | Whether the resource is a file, a queue, a program, a transaction or a map. |
| Resource | The resource name. For a dynamic reference this is the resolved name where one literal reaches the operand, and otherwise the data name supplying it. |
| Access | What the command does to the resource. |
| Dynamic | Whether the resource name came from a data item rather than a literal. Dynamic references are the ones an automated migration has to leave to a person. |
| Command | The CICS command that produced this access. |
IMS DL/I calls
io.moderne.mainframe.analysis.table.ImsDliCallsEvery DL/I database and message call, however it was written.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ImsDliCalls
| Column | Description |
|---|---|
| Program | The COBOL program making the call. |
| Paragraph | The paragraph or section containing the call. |
| Interface | The DL/I language interface: CBLTDLI, AIBTDLI, CEETDLI, PLITDLI, or EXEC DLI. |
| Function | The DL/I function, such as GU, GN, ISRT, REPL or DLET. Empty when the function code is supplied by a data item that more than one literal reaches. |
| Function operand | The argument the function code was passed in, whether or not it resolved. |
| PCB | The PCB the call was issued against. |
| PCB position | The PCB's position in the PSB, counting from zero, or -1 when the program does not declare it at its entry point. The PSB has to be joined on this position to name the database, because nothing in the COBOL does. |
| Message call | Whether the call is against the I/O PCB, making it a message queue read or write rather than a database call. |
| Access | What the call does: READ, CREATE, UPDATE, DELETE, CHECKPOINT or SYSTEM. |
| Segments | Segment names the call is qualified by, where they could be resolved. |
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. |