List every data set the portfolio names
io.moderne.mainframe.batch.AnalyzeDataSetsio.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 AnalyzeDataSets
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
Data set index
io.moderne.mainframe.analysis.table.DataSetIndexEvery data set the portfolio names, as a component of its own: what kind of file it is, the control card member that defines it, the jobs that create it, and how many jobs, steps and programs touch it. A data set has no source file, so nothing else in an estate reports one; it is named by every DD that allocates it and belongs to none of them.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetIndex
| Column | Description |
|---|---|
| Data set | The data set as the catalog holds it, with any library member or relative generation dropped and the symbols filled in. This is the only name two jobs can be joined on. |
| Kind | SEQUENTIAL, LIBRARY, VSAM, GDG, TEMPORARY, SYMBOLIC or SYSOUT. VSAM is only ever said by an IDCAMS DEFINE, so a cluster the database administrators define from somewhere the analysis cannot see reads as SEQUENTIAL. |
| Source path | The first member whose DD names it, which is where a data set is placed for want of a source file of its own, or the control card member that defines it. |
| Defined by | The control card member whose IDCAMS DEFINE creates it, empty for a data set nothing read defines. This is the one fact no other member of an estate holds: the JCL names the file on a DD and the COBOL names only the DD. |
| Defined as | The object the DEFINE makes — CLUSTER, AIX, PATH, GDG, NONVSAM. |
| Allocated by | The jobs whose step allocates it new — DISP=NEW, a CATLG on the way out, or a (+1) generation — joined with commas. Empty for a data set every job reads and none here writes, which is either another application's or one loaded by hand. |
| Jobs | How many jobs name it. |
| Steps | How many job steps allocate it, procedures expanded. |
| Programs | How many programs a step running them opens it under. |
| Readers | How many of those programs read it. |
| Writers | How many of those programs write it — create it, rewrite it, or scratch it. |
| Generations | The relative generations the jobs name, +1, 0, joined with commas. Empty for anything that is not a generation data group. |
Data set access
io.moderne.mainframe.analysis.table.DataSetAccessWho touches each data set: one row per file, job and program, with the steps and DDs it is reached through. Asking a file who reads it is the question a change to it starts with, and it is a row per accessor rather than a list in a cell because a file an installation shares has hundreds of them.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetAccess
| Column | Description |
|---|---|
| Data set | The data set as the catalog holds it, with any library member or relative generation dropped and the symbols filled in. |
| Job | The job name, empty for a member with no JOB card. |
| Member | The JCL member the job was read from. |
| Program | The program the step loads. A utility is one — SORT and IEBGENER touch as many files as anything compiled does. |
| Steps | The steps of that job that allocate it, joined with commas and qualified by the step that called their procedure, EXTRACT.RUN. |
| DD names | The DD names it arrives on, joined with commas. One job reaching a file under two DD names is a job doing two different things with it. |
| Use | The most that job does to it: CREATES, UPDATES, READS or DELETES, read from the disposition and from what the programs do. |
| Disposition | The DISP operands the job writes for it, joined with commas. |
| Generations | The relative generations the job names, +1, 0. Empty for anything that is not a generation data group. |
| CRUD | The letters of everything the run unit does to it — C, R, U, D, in that order. Empty where the program was not among the sources read, or where nothing in the run unit assigns the DD. |
Data set lifecycle
io.moderne.mainframe.analysis.table.DataSetLifecycleThe chain each data set goes through, in order: the control card that defines it, the job that creates it, the jobs that rewrite it and the jobs that read it. Nothing in an estate says this — each job knows only its own DD — so the chain is put together from the dispositions and from the order the schedule runs the jobs in.
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetLifecycle
| Column | Description |
|---|---|
| Data set | The data set as the catalog holds it, with any library member or relative generation dropped and the symbols filled in. |
| Kind | SEQUENTIAL, LIBRARY, VSAM, GDG, TEMPORARY, SYMBOLIC or SYSOUT. |
| Sequence | Where this link falls in the chain, counting from one. Ordering by it is what makes the rows a life rather than a pile: the definition, then the job that creates the file, then the jobs that change it, then the jobs that read it. |
| Use | DEFINES, CREATES, UPDATES, READS or DELETES. |
| Job | The job name, empty for a member with no JOB card and for a definition no job read here runs. |
| Member | The JCL member, or the control card member for the definition. |
| Step | The step, qualified by the step that called its procedure — EXTRACT.RUN. |
| Program | The program the step loads. |
| DD name | The DD the file arrives on, empty for a definition. |
| Generation | The relative generation this step names, +1 for the one it creates and 0 or -1 for one it reads. |
| Disposition | The DISP operand as written, which is what says whether the step expects the data set to exist. |
| CRUD | The letters of everything the run unit does to it — C, R, U, D, in that order. |
| Schedule order | How far into the schedule the job runs, counted along the conditions one job adds and the next waits for. 0 for a job nothing precedes, and for every job where no Control-M definition was read. |
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. |