Expand copybooks and procedures
ProprietaryReport every COBOL program and every job line by line as it runs rather than as it was written: each COPY and EXEC SQL INCLUDE replaced by what it brings in with REPLACING applied, each procedure and INCLUDE member exploded between //*+ lines with its DD overrides merged in and its symbols filled in. Every line says which member supplied it, which is what tells a line somebody can change in this file from a line that belongs to a copybook thirty programs share.
Both expansions happened at parse time and nothing is read a second time: a copied word carries the copybook that wrote it and a resolved body is part of the job's tree, so this is a second printing of the same tree. The tree itself is untouched and still prints back byte for byte the way the file was written, which is what makes the two readings comparable rather than a substitute for one another.
io. moderne. mainframe. listing. ExpandSourceOptional
Write each expansion beside the file it came from as <name>.expanded. A job is written as a deck that could be submitted; a program is written as a listing, numbered over the expansion with the member each line came from beside the number, since it holds both a COPY statement and what the statement brought in and so was never a deck. Off by default, because a portfolio's expansion is larger than the portfolio.
mod run . --recipe= io. moderne. mainframe. listing. ExpandSourceInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.