Skip to content

python-edition: COBOL → Python translation of core programs#33

Open
DukeDeSouth wants to merge 1 commit into
aws-samples:mainfrom
DukeDeSouth:python-edition
Open

python-edition: COBOL → Python translation of core programs#33
DukeDeSouth wants to merge 1 commit into
aws-samples:mainfrom
DukeDeSouth:python-edition

Conversation

@DukeDeSouth

@DukeDeSouth DukeDeSouth commented Feb 28, 2026

Copy link
Copy Markdown

Hey, I was playing around with the CardDemo codebase and ended up translating the main COBOL programs to Python. Figured it might be useful for anyone exploring modernization options or just wanting to understand the business logic without reading COBOL.

What's in there

python-edition/ folder with:

  • models.py — data models from the copybooks
  • services.py — 18 operations (auth, accounts, cards, transactions, users, batch)
  • app.py — simple Flask app so you can poke around in a browser
  • test_carddemo.py — 49 tests, all green
  • index.html — basic web UI

How to run

cd python-edition
pip install flask
python app.py
# http://localhost:5003 → ADMIN001 / PASSWORD

Notes

  • Found a few bugs in the original COBOL while going through it (typos, missing SYNCPOINTs, wrong status variables) — documented in the README
  • Doesn't touch any existing files
  • Just Flask, no other deps

No pressure to merge, just thought someone might find it handy.

Translates 30,175 lines of COBOL/CICS/VSAM into ~400 lines of Python
with a modern web interface, 49 passing tests, and 14 bug fixes
identified in the original source code.

Includes:
- models.py: Data models from COBOL copybooks (CVACT01Y, CVCUS01Y, etc.)
- services.py: All 18 business operations (sign-on through batch reporting)
- app.py: Flask web application replacing CICS/BMS
- index.html: Modern UI replacing 3270 green-screen terminal
- test_carddemo.py: 49 comprehensive tests
- README.md: Full translation mapping and bug documentation

Made-with: Cursor
@DukeDeSouth DukeDeSouth changed the title Add Python Edition — Full Translation of All 18 COBOL Programs python-edition: COBOL → Python translation of core programs Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant