Find the relationships of a program

Proprietary

Record what each program is built from and what it reaches, as relationship rows for diagramming and exploration: the copybooks it copies and includes, the programs it hands control to with CALL, LINK and XCTL, the CICS files, queues, maps and transactions it uses, the DB2 tables its embedded SQL touches and the verb it touches each with, and the IMS segments and message queue it reads, along with the PCB each segment was reached through and the database the PSB puts behind that position, which the call itself never names. A DB2 read is spread over declare, open, fetch and close and only the declaration names a table, so the cursor is the join and a fetch is reported as an access to the table it reads. A copybook that declares a table with DCLGEN gets a row of its own, since that is the one member where the table and the record layout standing in for it are written together. An assembler member is read the same way, for the copy members and shop macros it is built from, the control sections and entry points it defines, the programs it calls and the DL/I calls it issues; a macro invocation is an edge only where the estate writes the prototype, the rest being IBM's out of a library no repository holds. A SAS program is read for the members it includes and the DB2 tables it reads through a connection, a name out of a SAS library being a data set of that library and not a table any catalog has heard of. A CLIST and a REXX exec are read for the jobs they submit, the programs they run and the scripts they call, which is the one place an estate writes down how anything is started by hand; a name the script computed is left out, since the job CLMSUB really submits is a fact about two members and a parameter rather than about a statement. Every row carries the file and line of the statement that made it, so a relationship can be opened where it was written. Resource and program names supplied by a data item are resolved through the literals that reach them where exactly one does, and otherwise marked as missing, because the target is only known at run time.

io.moderne.mainframe.analysis.FindMainframeRelationships
mod run . --recipe=io.moderne.mainframe.analysis.FindMainframeRelationships

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