Language Foundry is a deterministic transpiler that converts IBM i RPG, mainframe COBOL, SAS analytical programs, and SAP ABAP into modern Java 21 and Python 3 — with equivalence-verified output and overnight regression testing across 5,077 source files. Part of the OrbaOS™ Post-Project World programme — bulk legacy migration alongside OrbaLang.
// Price calculation subroutine DCL-S price PACKED(9:2); DCL-S qty INT(10); DCL-S discount PACKED(5:4); DCL-S total PACKED(11:2); BEGSR CalcTotal; total = price * qty; IF qty > 100; discount = 0.15; total = total - (total * discount); ENDIF; DSPLY %CHAR(total); ENDSR;
// Generated by Language Foundry import foundry.rt.*; public class CALCPRICE { static RpgDec price = RpgDec.of("0", 9, 2); static long qty = 0L; static RpgDec discount = RpgDec.of("0", 5, 4); static RpgDec total = RpgDec.of("0", 11, 2); static void CalcTotal() { total = RpgDec.of(price.big() .multiply(RpgDec.bigOf(qty)), 11, 2); if (qty > 100L) { discount = RpgDec.of("0.15", 5, 4); total = RpgDec.of(total.big().subtract( total.big().multiply(discount.big())), 11, 2); } RT.dsply(RT.charOf(total)); } }
classic-op), fixed-format free-op blocks (freeop), and RPG II/III conditioning indicators that pre-date RPG IV free-form. These constructs appear in less than 1 in 300 statements and are emitted as documented stubs. Support is on the roadmap.
Two free tools for developers working with legacy code. No signup, no credit card.
Paste any Base64 string and decode it instantly. See the same decode function written in COBOL, RPG IV, SAP ABAP, SAS, Java 21, and Python 3 — side by side.
Open tool →Paste real COBOL or RPG source code and get idiomatic Java 21 output. Work email required — 10 free runs per organisation.
Try the demo →Every RPG source file passes through four deterministic stages. Each gate validates its input before the next stage runs — no guesswork, no silent failures.
Built from first principles to handle real-world RPG programs — not just toy examples.
RpgDec — a BigDecimal-backed type that preserves precision, scale, and overflow rules.POST /transpile for integration with CI/CD pipelines and IDEs. Deployable to Railway, Docker, or any container platform.Language Foundry was stress-tested against thousands of publicly available RPG and COBOL programs drawn from 239 open-source repositories — not synthetic benchmarks.
| Opcode | Occurrences in Corpus |
|---|---|
| READ | |
| EXSR | |
| MOVE | |
| GOTO | |
| BEGSR | |
| CHAIN | |
| COMP | |
| SETLL |
A systematic campaign of quarantine-ledger analysis and targeted construct implementation drove the handle rate to 100% on the full 158-program stress corpus.
Language Foundry is the legacy migration surface on languagefoundry.io. Sibling products live on orbaos.com and *.orbaos.com — governed rules via OrbaLang, board diagnostics via Instruments, and finance-grade calculators on the same doctrine layer.
Language Foundry is a professional transpilation service. Get in touch to discuss your codebase, pricing, and a tailored migration plan.