How josecampos777/cobol-core-banking works
1. Repository purpose
This repo is a small banking/financial processing stack centered on a legacy-style batch engine. Its architecture combines a COBOL computation core, flat-file master data, a migration path into Oracle, and Docker-based runtime orchestration.
2. Core processing engine
The main business logic lives in intereses.cob. This is the calculation engine for interest processing, so it is the primary compute boundary in the system. It represents the legacy domain logic that produces financial results from account data.
3. Operational input data
cuentas.dat is the master data file consumed by the core process. From the repository description, it holds balances and positional account information, so it is the main input source for batch computation.
4. Batch orchestration layer
run_banco.sh acts as the execution orchestrator. The README describes it as a JCL-like runner that compiles and executes the COBOL program through Docker, so it is the boundary between the host environment and the isolated legacy runtime.
5. Containerized runtime boundary
Docker is a key architectural layer even though the compose files are not listed here. The system is designed to run the GnuCOBOL toolchain in containers, which isolates compilation and execution from the host and makes the legacy workload portable.
6. Migration subsystem
legacy_to_oracle_migration.py is the bridge from flat-file legacy storage into relational persistence. Its role is distinct from the COBOL batch engine: it handles data movement and transformation into Oracle rather than financial computation.
7. Database schema layer
script TBL_CORE_BANKING.sql defines the Oracle 11g XE schema and tables used by the migration path. This file represents the database contract for the modernized storage layer and is the destination boundary for migrated legacy data.
8. Configuration and environment
.env.example suggests the system expects environment-driven configuration, likely for container settings, file paths, and database connectivity. This is important because it implies the runtime is parameterized rather than hardcoded.
9. Primary data flows
The main flow appears to be: legacy account file in cuentas.dat → COBOL batch processing in intereses.cob → execution under Docker via run_banco.sh. A separate but related flow is: flat-file or legacy data → legacy_to_oracle_migration.py → Oracle tables defined in script TBL_CORE_BANKING.sql.
10. Architectural split
The repo is split into two clear concerns: batch financial computation and legacy-to-relational migration. The COBOL side preserves legacy processing semantics, while the Python/SQL side enables database-backed integration with Oracle.
11. What is not present
There is no evidence here of a web tier, message broker, or large application framework. The architecture is intentionally minimal and batch-oriented, with files, scripts, and database schema doing most of the work.
12. How to diagram it
An accurate diagram should show three main zones: a legacy batch processing zone (cuentas.dat, intereses.cob, run_banco.sh), a migration/integration zone (legacy_to_oracle_migration.py), and a persistence zone (script TBL_CORE_BANKING.sql / Oracle 11g XE), all executed within or coordinated by Docker.
Main entry points: run_banco.sh Batch runner · legacy_to_oracle_migration.py Migration bridge · intereses.cob Interest core · cuentas.dat Accounts file
Components 8
Legacy batch
COBOL interest processing and its file-based execution path.
- Accounts file · Master account data and balances consumed by batch processing.
cuentas.dat - Interest core · Legacy interest calculation engine for financial processing.
intereses.cob - Batch runner · JCL-like script that compiles and runs the COBOL workload.
run_banco.sh
Migration
Bridge from legacy files into relational storage.
- Migration bridge · Transforms legacy data into relational Oracle persistence.
legacy_to_oracle_migration.py
Oracle persistence
Schema and tables for the modernized banking store.
- Oracle schema · Database contract defining the target banking tables.
script TBL_CORE_BANKING.sql - Oracle 11g XE · Target database used by the migration path.
Runtime
Containerized execution and environment configuration.
- Docker runtime · Isolated toolchain and execution environment for the legacy batch stack.
- Env config · Example environment-driven settings for paths, containers, and connectivity.
.env.example
Connections 10
- Accounts file → Interest core: input data · Flat-file account records feed the interest calculation engine.
- Interest core → Batch runner: executed by · The COBOL program is compiled and launched by the batch runner.
- Batch runner → Docker runtime: runs in · Execution is delegated to the containerized toolchain.
- Env config → Batch runner: configures · Environment values parameterize the runner and runtime setup.
- Migration bridge → Accounts file: reads · Migration consumes legacy file-based source data.
- Migration bridge → Oracle schema: targets schema · Transformation aligns with the Oracle table structure.
- Oracle schema → Oracle 11g XE: defines · DDL establishes the relational destination for migrated data.
- Migration bridge → Oracle 11g XE: loads into · Migrated data is persisted into Oracle.
- Docker runtime → Interest core: hosts · The container boundary provides the legacy COBOL runtime.
- Docker runtime → Batch runner: executes · The host script orchestrates compilation and execution inside Docker.