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

Say when each job runs, what has to end first, and on which days

Recipe IDio.moderne.mainframe.controlm.AnalyzeControlMSchedules
Artifactio.moderne.recipe:recipes-mainframe

Record every job Control-M runs: the JCL member it submits and the library it is taken from, the table and application it is ordered under, the calendars its days are read against, and the definition as written. A second table is the order the night runs in, joined from the condition one job adds and the next waits for, and a third decodes each calendar into the days it actually has. FindControlMSchedules answers the same question and marks the member each job submits; 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 AnalyzeControlMSchedules

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​

Control-M schedule
io.moderne.mainframe.analysis.table.ControlMSchedule

Every job the scheduler runs, with the JCL member it submits. A JCL member says what a job does and nothing anywhere else says when it runs, out of which library the member is taken, or under which table and application it is ordered — so this is the far end of the batch estate, and the row carries the definition as written for the Scheduler Info report.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ControlMSchedule
ColumnDescription
JobThe name the scheduler knows the job by. A table is a job too, and carries its own scheduling days and conditions.
TableThe table the job is ordered in, which is the folder it is written under in an export and the panel's GROUP field otherwise. A table names itself.
SMART tableWhether that table is a SMART table — one ordered, held and rerun as a unit, and so worth a containment edge — rather than a plain folder. Two folders of the same name, one of each kind, is a real export; nothing but this tells their jobs apart. A panel says which table a job is in but not what kind, so a job read from one always answers false, and so does a table itself.
GroupThe group the definition names for itself: the panel's GROUP, the export's SUB_APPLICATION. The panel writes one field where the export writes two, so on a panel this is the table again.
Member nameThe JCL member submitted, from MEMNAME. Empty for a table, which runs the jobs under it rather than a member of its own.
Member libraryThe library the member is taken from, from MEMLIB. Two applications routinely schedule a member of the same name out of different libraries.
ApplicationThe application the job is ordered under.
Task typeJob for a member submitted to JES, SMART Table for a table, and a dozen others for the work the scheduler does itself.
CalendarsThe calendars the scheduling days are validated against, each as the kind of decision it makes and the calendar name: CONFIRMATION says which days the job may run on at all, DAYS and WEEK which of the days written apply.
JCL pathThe file the member was read from, empty where no member of that name was read. A schedule for a member nobody supplied is how a gap in an ingestion shows.
Definition pathThe file the definition was written in: the export, or the member holding the one panel.
Definition lineThe one-based line of that file the definition begins on.
DefinitionThe definition as written, which is what the Scheduler Info report shows. A table carries its jobs inside it, so a table's own definition is its opening tag.
Control-M dependencies
io.moderne.mainframe.analysis.table.ControlMDependencies

Which job the scheduler runs before which, one row per pair. Nothing in a schedule names another job: a job adds a condition when it ends and another job waits for that name, so the order the night runs in is only readable by joining the two — and the join holds across tables and across applications without either side saying so.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ControlMDependencies
ColumnDescription
PredecessorThe job that adds the condition, which is the one that has to end first.
Predecessor tableThe table the predecessor is ordered in.
Predecessor pathThe file the predecessor's definition was written in.
Predecessor lineThe one-based line of that file the predecessor's definition begins on.
SuccessorThe job that waits for the condition.
Successor tableThe table the successor is ordered in.
Successor pathThe file the successor's definition was written in.
Successor lineThe one-based line of that file the successor's definition begins on.
ConditionThe name both jobs write and neither explains. Shops name it after the predecessor, which is convention rather than syntax — a chain whose names do not follow it still runs in this order.
Order dateThe run the successor asks for the condition on: ODAT for today's, PREV for the one before, which is how a job waits on the work of the night before rather than on tonight's.
Across tablesWhether the two jobs are ordered in different tables. A chain inside one table is what an operator sees on one screen; one that leaves it is the dependency nobody remembers is there.
Control-M calendars
io.moderne.mainframe.analysis.table.ControlMCalendars

The days each calendar has, a row per year it carries. A schedule writes the days a job is a candidate to run on and the calendar decides which of those the shop is open for, so the days a job really runs are only readable by decoding the year as exported: twelve months of thirty-one positions, Y or N, a position past the end of a month being N.

Export after a run
mod study . --last-recipe-run \
--data-table io.moderne.mainframe.analysis.table.ControlMCalendars
ColumnDescription
CalendarThe name the schedules refer to it by.
TypeRegular for a calendar of dates, Periodic for one whose days are named periods, Rule Based for one generated from a rule.
Data centerThe Control-M data center the calendar is defined in. The same name is routinely defined in several, with different days in each.
YearThe year these days are in, or 0 for a calendar carrying no year — which is either a rule-based one or, where no file defines it at all, a gap in what was supplied.
DaysHow many days of that year the calendar has.
DatesEvery day the calendar has, in order, as ISO dates. This is what turns "runs on CLMWORK" into the year calendar of execution days.
Definition pathThe file the calendar was defined in, empty where a schedule names one no export defines.
Definition lineThe one-based line of that file the definition begins on.
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.