Realia COBOL 4.00 for DOS: From Experiment to Field Notes
Long story short, I wrote a document with my notes about Realia COBOL 4.00 for DOS, along with some example code showing how to use this little gem of a compiler.
It’s difficult to get into too much detail about how I got here without spoiling the broader research. Let’s just say that lately I seem to have developed the habit of asking myself silly little questions that eventually lead to months of research and rather a lot of documentation. This is one branch of a broader question that I will explore in another post.
Continuing in much the same direction as my essay Cobolito/400, I found myself looking for a COBOL compiler for DOS. A few are still somehow available on the Internet, including Microsoft COBOL and, if you are lucky, some versions of Micro Focus COBOL, both much more mainstream choices. Then I stumbled across Realia COBOL 4.00 for DOS.
What first caught my attention was how remarkably small it was: in less than a megabyte, you have the compiler, linker and libraries. The lack of documentation probably should have discouraged me. Instead, I got stubborn and decided that I wanted to know more about it.
The experiment gradually turned into a small book-library management application, written entirely in Realia COBOL 4.00, with add, browse, search, edit, delete and sort functions. The point was not to exercise every corner of the compiler, but to find out whether it could still be used to build the kind of small, full-screen TUI application I had in mind, similarly to what I did with the CrumbStation demo application.
For those who haven’t read that essay, and I must admit it is rather long, I wanted something based around field-oriented interaction and function keys, while keeping the data itself in simple sequential files that could remain understandable and portable outside Realia.
That deliberately narrow scope also shaped the notes: rather than trying to document the compiler exhaustively, they concentrate on the parts I actually needed to make that application work, from SCREEN SECTION and function-key handling to sequential files, program calls and a few compiler oddities encountered along the way.
So, yeah. What started in August 2026 ended up occupying the better part of three months, with enough dead ends, isolated tests and compiler archaeology along the way that the notes gradually became a project of their own.
You can still find Realia COBOL 4.0, and also Realia COBOL 3.0, in a few archives on the Internet. But there is basically no publicly available documentation for these old DOS compilers. Later CA-Realia documentation still exists, but it is not necessarily easy to obtain. Some manuals sit behind enterprise support access rather than being openly downloadable, and in any case they belong to a newer generation of the product and often do not describe the behaviour of the DOS 4.00 compiler particularly well.
So I decided to share what I had learned and turn the notes into a PDF, together with a repository containing a few simple source examples. The hope is that it can leave something useful behind for somebody who, years from now, comes across this compiler and thinks: “Yeah, I like it. But where do I even start?”
A big shout-out to Eugenio Di Lorenzo for his support, and for providing invaluable documentation and first-hand experience with Realia. Of all the places in the world where I might have found somebody who knew this compiler, I somehow ended up finding an expert in another Italian living not very far away.
Link to the repository and PDF on Codeberg.
Mirror of the PDF on my blog.