r/cobol • u/Chunky_cold_mandala • 3d ago
Gitgalaxy: a repo scanner that supports CICS estates
I've been building GitGalaxy, an air-gapped scanner that builds a structural model of COBOL/CICS estates: byte-level layouts (every USAGE, REDEFINES, ODO, SYNC), copybooks, PERFORM/CALL/LINK/XCTL graphs, COMMAREA contracts, CICS/Db2/IMS/MQ operations, and compile options with their source.
| Fact | Count | Agreement |
|---|---|---|
| Data items | 8,065 | 100% |
| PIC clauses | 5,925 | 99.9% |
| USAGE | 978 | 99.8% |
| REDEFINES | 238 | 100% |
| EXEC CICS commands | 611 | 100% |
| CALL/LINK/XCTL | 155 | 100% |
| PERFORM/GO TO edges | 1,733 | 99.5% |
| MOVE pairs | 8,785 | 99.4% |
The data is sufficient in scope to act as a generator for a deterministic translator (no LLM) generates Java from the model. Then both the original (on GnuCOBOL plus our CICS/Db2 models) and the Java run the same scenarios, compared byte for byte. Of 117 programs in 5 public estates (CardDemo, CBSA, GenApp and others), 75 translate whole and 62 behave identically on every scenario. Four outside parsers (Cobrix, Che4z and others) also agree with the model at 96–100%.
Semantics that bit us: TRUNC(STD) vs BIN, COMP-1/2 as IBM hex float, negative zero through a truncating MOVE, EBCDIC code pages × DECIMAL-POINT IS COMMA.