💼 A modular COBOL banking simulation demonstrating core legacy financial system patterns.
FinTrust COBOL simulates the architecture of mainframe-era banking software using GnuCOBOL. It is structured as a multi-module COBOL application with a central menu driver that dynamically CALLs subprograms as shared objects — mirroring how real COBOL systems are organized in production mainframe environments.
The system follows a standard COBOL subprogram model:
mainmenu.cbl— Main driver. Compiled as an executable. Routes user input to submodules via dynamicCALLstatements.programs/— Submodules compiled as.soshared objects (GnuCOBOL-mflag), loaded at runtime viaCOB_LIBRARY_PATH.
mainmenu (executable)
├── CALL "ACCTMGMT" → programs/account_management.cbl
├── CALL "VIEWTRANS" → programs/view_transactions.cbl
├── CALL "LEDGERSM" → programs/ledger_summary.cbl
└── CALL "AUTHUSER" → programs/authenticate_user.cbl| Module | Program-ID | Description |
|---|---|---|
| Account Management | ACCTMGMT |
View, open, close, and update account records |
| View Transactions | VIEWTRANS |
Browse transactions by account, type, or date |
| Ledger Summary | LEDGERSM |
Summarize balances using fixed-decimal arithmetic |
| Authenticate User | AUTHUSER |
Credential lookup via table search |
- GnuCOBOL 3.x (
sudo apt install gnucobolon Ubuntu/WSL) - GNU Make (optional, for the Makefile build)
- Linux or WSL (Windows Subsystem for Linux)
Using Make (recommended):
make # compile all modules and main executable
make run # launch FinTrust COBOL
make clean # remove compiled artifactsManual compilation:
cobc -m -o ACCTMGMT programs/account_management.cbl
cobc -m -o VIEWTRANS programs/view_transactions.cbl
cobc -m -o LEDGERSM programs/ledger_summary.cbl
cobc -m -o AUTHUSER programs/authenticate_user.cbl
cobc -x -o fintrust mainmenu.cbl
COB_LIBRARY_PATH=. ./fintrustPIC 9/PIC X— numeric and alphanumeric field definitionsPIC 9(9)V99— fixed-decimal for monetary valuesPIC S9(9)V99- signed variable that can hold both positive and negative valuesOCCURS— table definitions for multi-record structuresREDEFINES— field overlay for alternative data interpretationsVALUE— field initialization at declaration
Supplementary documentation written from a code reviewer's perspective, covering the patterns, pitfalls, and mainframe concepts that matter most in production COBOL environments.
| Document | Contents |
|---|---|
| COBOL Antipatterns | Top 10 patterns to flag in any review — missing AT END, unsigned fields, GO TO chains, MOVE truncation, and more |
| Numeric Precision | Fixed-decimal arithmetic, implied decimal V, signed vs unsigned, ROUNDED, ON SIZE ERROR |
| File Handling | Sequential I/O patterns, OPEN/CLOSE discipline, VSAM organizations, JCL DD context |
| Data Division Guide | Level numbers, PIC clause reference, OCCURS, REDEFINES, 88-levels, LINKAGE SECTION |
| Mainframe Concepts | z/OS vs GnuCOBOL differences, VSAM, FILE STATUS codes, JCL, RACF, batch architecture, abend codes |
Built for educational and demonstrative purposes. FinTrust COBOL is not a banking institution.
© 2026 Alexis M Vasquez, Software Engineer. All rights reserved. No financial services are provided by this software.