Find the tables the DDL creates and who reaches them

Proprietary

Report the DB2 schema the portfolio creates and mark every statement that creates part of it: each table with its columns, primary key, foreign keys and indexes, anchored at the member and line it is created on. DDL is written in two places and neither stands for the other — a member of a DDL library, and the SYSIN stream of the job that submits it, which is where an index added to a live table years later usually ends up — so both are read and the job that carries a stream is marked in place of statements that are not its own. The summary joins each table to the programs whose EXEC SQL names it and to the packages and plans those programs are bound into, which is what a change to the table has to be rebound into; an unqualified table name in a program is resolved against the qualifier its package was bound with, because that is written in the bind deck and nowhere else. A foreign key becomes a relationship between the two tables, so the model diagram is the same graph everything else is drawn from. AnalyzeDb2Catalog answers the same question and changes nothing.

io.moderne.mainframe.db2.FindDb2Catalog
mod run . --recipe=io.moderne.mainframe.db2.FindDb2Catalog

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.