ORPHANWARE RECOVERY
Home/Guides/Case pattern: the 1990 Clipper invoicing program

Case pattern: the invoicing program from 1990

When a Clipper-era invoicing program still runs the business and the developer is long gone, recovery follows a fixed order. Protect the machine and the files first, get a $45 Recon Report verdict on the EXE, rebuild readable source, prove the rebuild against the old program with differential testing, and only then move the DBF data to whatever comes next. This page walks that order end to end through a composite scenario, so an owner can see each step before paying for any of them.

Last updated

Composite scenario, not a real client. The business, program, and events below are assembled from patterns that recur in Clipper and dBase owner situations. No client names, quotes, numbers, timelines, or results on this page come from an engagement. Clipper is not yet part of the measured record on this site. The only measured results are the ones on the homepage: 9 of 9 C and C++ test targets recovered to compilable source, with 0 behavioral divergences in final differential testing.

Why this pattern is worth walking through

The pattern is real even though this telling is a composite. In a public Hacker News thread, one commenter described a Clipper and dBase invoicing program running on DOS with a single terminal "since 1990 or so", reliable for decades, and facing replacement only because tax rules changed (Hacker News: The World of Legacy IT Systems). Clipper was built for exactly this kind of program. It compiled dBase-style code into standalone DOS applications, and in the years from 1985 to 1992 it was used to build a great many small business database programs (Wikipedia: Clipper). Many are still running.

The setup

In the composite, a small wholesale business runs its invoicing on a DOS program a local contractor wrote around 1990. It prints invoices and statements, tracks customers and open balances, and numbers every invoice in sequence. The contractor retired years ago and nobody has the source. The program lives on an old Windows XP PC in the back office, where a desktop shortcut runs a batch file that starts it. A spare copy runs under DOSBox on a newer laptop, but nobody trusts it for month end.

The forcing event is ordinary: a tax change needs a new line on the invoice, and the old PC has started making noises. The program still works. Nobody can change it.

Step 1: know what the program is made of

The program folder usually holds more than the EXE. In a typical Clipper application it looks like this:

  • INVOICE.EXE (or similar): the compiled program. Clipper source lived in .prg files that were compiled and linked into the EXE. Much of the application logic in a Clipper EXE is p-code executed by the Clipper runtime linked into it, rather than native machine code (Wikipedia: Clipper).
  • .dbf files: the tables for customers, items, invoices, and invoice lines.
  • .dbt files: memo files for long text such as notes. Clipper's default data driver, DBFNTX, uses .dbt memos (The Holmes Page: Introduction to RDDs).
  • .ntx files: Clipper's standard index files, the default index extension in CA-Clipper 5.2 (Guide to CA-Clipper: INDEX). They can be rebuilt from the tables but must match what the program expects.
  • .mem files, if present: saved memory variables, an xBase file type of its own (Wikipedia: .dbf). Small programs sometimes keep settings or counters in them.
  • The batch file, CONFIG.SYS and AUTOEXEC.BAT settings, and printer setup that make it start and print correctly.

Clipper versions matter for the recovery. The Nantucket seasonal releases ended with Summer '87, and Clipper 5 followed from 1990 through CA-Clipper 5.3b in 1997 (Wikipedia: Clipper). Which one built the EXE is one of the first things the recon establishes.

Step 2: save everything before touching anything

Before any recovery work, the business protects what it has. That means an image of the XP PC's drive, a copy of the whole program folder with the tables, memos, indexes, and batch files, and a copy of the DOSBox setup. It also means expected outputs: a handful of printed invoices and statements the office knows are right, and screenshots of the screens staff rely on. Those become the yardstick for testing later. Nobody reindexes, packs, or "cleans up" the tables on the original machine. The what to save checklist covers the full list.

Step 3: the Recon Report

The first paid step is the Recon Report: $45, delivered in about 3 days. It inventories the program from the binary itself: what kind of EXE it is and which Clipper version built it, the screens and reports, the tables and fields it reads and writes, and the rules it visibly applies, such as how invoice numbers advance. It ends with an honest feasibility verdict and a scope for the work that would follow. If the EXE is packed, damaged, or otherwise a poor bet, the report says so plainly, and the business has spent $45 to learn it. The sample Recon Report shows the format.

Step 4: rebuild readable source

If the verdict is go, the program logic is reconstructed into readable source: named procedures and functions, the screen and report definitions, and the table usage, organized the way a developer would write it. The data side is documented alongside the code, because the DBF structure is half of what the program is. The source is then compiled. Source that does not build is not recovered, whatever it looks like on the page.

For Clipper, a natural build target is Harbour, a free compiler that describes itself as 100% compatible with Clipper compilers (Harbour project) and runs on current operating systems. Whether Harbour is the right target for a specific program is part of the recon scope, not an assumption.

Step 5: prove the rebuild against the old program

The rebuild has to behave like the original before anyone relies on it. Differential testing runs the original EXE and the rebuild side by side on the same inputs and compares the outputs exactly. For an invoicing program that means copies of the same tables in, then the same invoices, totals, statements, and updated tables out, compared field for field. Generated cases lean on the places invoicing logic tends to hide surprises: rounding on line totals, discounts and tax on edge values, dates near month and year boundaries, deleted records that were never packed, and the invoice number sequence. Every divergence is traced and fixed, and the suite runs again until it is clean. The honest limit applies: a clean run proves the rebuild matched on every case tested, not every case possible.

Step 6: make the change the business needed

Only now does the tax change go in. It is made in the recovered source, and the differential suite runs once more. This time the expected differences are known in advance: the new invoice line and the totals it affects. Anything else that changes is a bug. The office gets a program it can change again next time, with source it can hand to any developer.

Step 7: move the DBF data on a schedule

Keeping the rebuilt program and migrating to new software are both open choices once the source exists. If the business migrates, the recovered source and the documented data structure become the specification: every field, calculation, and report the replacement has to match. The DBF tables are exported in a planned run on copies, with the memo files beside them, the right DOS code page for accented names, and a decision about deleted records. The guide to opening DBF files covers the export itself. The new system runs alongside the old one while invoices are compared, and the switch happens when the numbers agree. The guide on documenting a legacy system before you migrate covers the rest.

What this pattern does not promise

  • It does not promise every Clipper EXE is recoverable. Some are not, which is why the recon comes first and costs $45.
  • It does not claim measured Clipper results. The published measured record is for C and C++ targets, plus a Delphi feasibility result on a Free Pascal target, and it is stated on the homepage.
  • It does not describe a specific client. It is a composite, labeled as one.

Orphanware Recovery is operated by Josiah Wilson, who directs every engagement and signs off on every result. AI agents run the decompilation, reconstruction, and testing pipeline under his direction. For the wider options on FoxPro and Clipper programs, see the Visual FoxPro and Clipper guide and the Clipper and dBase directory entry. To start, the intake checklist lists what to send, and the pricing section on the homepage has the fixed prices.

Start with a $45 Recon Report

An honest verdict on whether your program can be recovered, what it does, and what a full recovery would take. Fixed price, delivery in about 3 days.