Your hotkey to alternative software development

Essential Reading

There are many nice books out there, but a few of them contain such wisdom that I just must mention them here:

Jan '13


Clarion TPS is proprietary file format that holds table based data. I needed a tool that could extract the data from those files in bulk. I could not find such tooling, so I had to reverse engineer the file format.

This was no trivial exercise and I spent my Christmas holiday twiddeling with bits and bytes. Good fun! I've documented this journey of discovery in a blog post . The resulting library (Apache 2.0 licensed) can be found on github .

On this page however, I present the command line tool for bulk converting TPS files. That is right, folder in, folder out. It converts to properly escaped CSV with customizable separator and quote characters. A typical tool you would use do if you're migrating away from TPS.

A note of warning though: This software is based on Reverse Engineered TPS Files. As such, its probably incomplete and may mis-interpret data. It is no replacement for any existing Clarion tooling. Check the output files thoroughly before proceeding.

Usage: java -jar tps-to-csv.jar [options]
  -s source TPS file or folder containing TPS files.
  -t target CSV file or folder to create CSV files in.
  -sep separator character, used to separate fields.
   Use two hex digits for non standard chars (09=tab).
   Default: ,
  -quot quote character, used to quote field values.
   Use two hex digits for non standard chars.
   Default: "
  -encoding CSV output encoding.
   Default: ISO-8859-1
  -e shows stacktraces.
  -i displays TPS file information.
  -layout displays the file layout.
  -idx displays the record ids for the available indexes.
  -ignoreErrors ignores errors, parsing only the pages
   that are readable (data is lost!).
  -raw Don't attempt any character encoding, output the bytes as is.
  -compare Compare Output File to existing Csv
  -owner, -password specify the owner/password for the tps file.
  -direct, writes directly to file without buffering,
   useful for large files. Does not sort.
  -tpsEncoding, TPS (input) encoding for strings. Default: ISO-8859-1
  -verbose, more verbose output.



Download the apache 2.0 licensed executable Jar file here (v1.0.15 / 05 March 2021) , Java 8+ required. As said, the source code is on github .

There is a brief guide on running TPS-to-CSV for those of you who are not really into Java or the Command Prompt.