Skip to content

This project demonstrates a full CRUD application in COBOL using SQLite, running inside a Docker container.

CodeAlchemy-Labs/cobol-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐘 COBOL + SQLite CRUD in Docker

This project demonstrates a full CRUD application in COBOL using SQLite, running inside a Docker container.
The COBOL program executes SQL commands through the SQLite CLI, showing how old-school COBOL can still work with modern databases.


🚀 Features

  • Dockerized environment (Debian + GnuCOBOL + SQLite)
  • SQL schema initialized with init.sql
  • COBOL program performing Create, Read, Update, Delete (CRUD)
  • No host dependencies (only Docker required)

📂 Project Structure


cobol-sqlite/
│── docker-compose.yml   # Docker services definition
│── Dockerfile           # Build instructions for COBOL + SQLite
│── README.md            # Project documentation
│── crud.cbl         # COBOL CRUD program
│── init.sql         # SQL script to create and seed the DB


🛠️ How to Run

1. Build and start the container

docker compose up -d --build

2. Enter the container

docker exec -it cobol-sqlite bash

3. Initialize the database

sqlite3 employees.db < init.sql

4. Compile the COBOL program

cobc -x crud.cbl -o crud

5. Run the program

./crud

🎯 Next Steps

  • Replace SQLite with PostgreSQL or MySQL using ODBC.
  • Wrap SQL calls in COBOL procedures for cleaner code.
  • Extend with user input (interactive CRUD from terminal).

👤 Author

Maintained by Diego Botina

Because even COBOL deserves some modern love ⚡

About

This project demonstrates a full CRUD application in COBOL using SQLite, running inside a Docker container.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published