Skip to main content
Moderne OnlyThis recipe is proprietary to Moderne and runs on the Moderne platform or CLI — it isn’t part of the open-source catalog. Available with a Moderne subscription.Contact Sales

List every data set the portfolio names

Recipe IDio.moderne.mainframe.batch.AnalyzeDataSets
Artifactio.moderne.recipe:recipes-mainframe

Record each data set as a component of its own — what kind of file it is, the control card member whose IDCAMS DEFINE creates it, the jobs that allocate it new, and how many jobs, steps and programs touch it — with who touches each file, a row per job and program, and the chain each file goes through in order, from the card that defines it through the job that creates it to the jobs that read it. FindDataSets answers the same question and marks the DD cards and DEFINE commands that make a file; this one produces the tables and changes nothing.

Single recipeOpenRewriteModerne Proprietary License
Try in PlatformTry this recipe in the Moderne platform. Not a user yet? You’ll get a no-setup demo environment, with nothing to install or configure.

Usage​

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.

shell
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.

mod config recipes jar install io.moderne.recipe:recipes-mainframe:RELEASE

Data tables​

Data set index
io.moderne.mainframe.analysis.table.DataSetIndex

Every 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.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetIndex
ColumnDescription
Data setThe 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.
KindSEQUENTIAL, 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 pathThe 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 byThe 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 asThe object the DEFINE makes — CLUSTER, AIX, PATH, GDG, NONVSAM.
Allocated byThe 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.
JobsHow many jobs name it.
StepsHow many job steps allocate it, procedures expanded.
ProgramsHow many programs a step running them opens it under.
ReadersHow many of those programs read it.
WritersHow many of those programs write it — create it, rewrite it, or scratch it.
GenerationsThe 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.DataSetAccess

Who 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.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetAccess
ColumnDescription
Data setThe data set as the catalog holds it, with any library member or relative generation dropped and the symbols filled in.
JobThe job name, empty for a member with no JOB card.
MemberThe JCL member the job was read from.
ProgramThe program the step loads. A utility is one — SORT and IEBGENER touch as many files as anything compiled does.
StepsThe steps of that job that allocate it, joined with commas and qualified by the step that called their procedure, EXTRACT.RUN.
DD namesThe 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.
UseThe most that job does to it: CREATES, UPDATES, READS or DELETES, read from the disposition and from what the programs do.
DispositionThe DISP operands the job writes for it, joined with commas.
GenerationsThe relative generations the job names, +1, 0. Empty for anything that is not a generation data group.
CRUDThe 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.DataSetLifecycle

The 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.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.DataSetLifecycle
ColumnDescription
Data setThe data set as the catalog holds it, with any library member or relative generation dropped and the symbols filled in.
KindSEQUENTIAL, LIBRARY, VSAM, GDG, TEMPORARY, SYMBOLIC or SYSOUT.
SequenceWhere 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.
UseDEFINES, CREATES, UPDATES, READS or DELETES.
JobThe job name, empty for a member with no JOB card and for a definition no job read here runs.
MemberThe JCL member, or the control card member for the definition.
StepThe step, qualified by the step that called its procedure — EXTRACT.RUN.
ProgramThe program the step loads.
DD nameThe DD the file arrives on, empty for a definition.
GenerationThe relative generation this step names, +1 for the one it creates and 0 or -1 for one it reads.
DispositionThe DISP operand as written, which is what says whether the step expects the data set to exist.
CRUDThe letters of everything the run unit does to it — C, R, U, D, in that order.
Schedule orderHow 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.SourcesFileResults

Source files that were modified by the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileResults
ColumnDescription
Source path before the runThe source path of the file before the run. null when a source file was created during the run.
Source path after the runA 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 changesIn 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 changesThe specific recipe that made a change.
Estimated time savingAn estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds.
CycleThe recipe cycle in which the change was made.
Source files that had search results
org.openrewrite.table.SearchResults

Search results that were found during the recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SearchResults
ColumnDescription
Source path of search result before the runThe source path of the file with the search result markers present.
Source path of search result after run the runA recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run.
ResultThe trimmed printed tree of the LST element that the marker is attached to.
DescriptionThe content of the description of the marker.
Recipe that added the search markerThe specific recipe that added the Search marker.
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrors

The details of all errors produced by a recipe run.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.SourcesFileErrors
ColumnDescription
Source pathThe file that failed to parse.
Recipe that made changesThe specific recipe that made a change.
Stack traceThe stack trace of the failure.
Recipe performance
org.openrewrite.table.RecipeRunStats

Statistics used in analyzing the performance of recipes.

Export after a run
mod study . --last-recipe-run \
--data-table org.openrewrite.table.RecipeRunStats
ColumnDescription
The recipeThe recipe whose stats are being measured both individually and cumulatively.
Source file countThe number of source files the recipe ran over.
Source file changed countThe 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.