All systems

Sage 50

Sage 50 CSV exports
Supported
Guide

Sage 50 US (formerly Peachtree) is small business accounting software. DataMeans reads Sage 50 US data from the CSV exports Sage 50 itself writes. Sage 50 UK (formerly Line 50) and Sage 50 Canada are different products with different files and menus.

What You Can Upload

  • .csv exports of Sage 50 lists and reports (Customers, Vendors, Chart of Accounts, and so on)
  • A ZIP archive of those exports

DataMeans can't read the company files themselves. Sage 50's .DAT files are Btrieve files whose records are compressed on disk, and a .ptb backup is a compressed container. If you upload either, DataMeans recognizes it and shows you how to export instead.

What You Get Out

DataMeans converts your data into multiple modern formats:

OutputDescription
csv/{TableName}.csvOne CSV file per table with all row data
xlsx/{TableName}.xlsxExcel workbook per table (omitted for tables over 1,048,575 rows, 16,384 columns or 8,000,000 cells - see note below)
xls/{TableName}.xlsLegacy Excel format per table (omitted for tables over 65,535 rows, 256 columns or 150,000 cells - see note below)
json/{TableName}.jsonJSON array of records per table
json/{TableName}.jsonlNewline-delimited JSON (streaming-friendly)
postgres.sqlPostgreSQL CREATE TABLE + INSERT statements
mysql.sqlThe same schema and rows, in MySQL dialect
sqlite.sqlThe same schema and rows, in SQLite dialect
ansi.sqlThe same schema and rows, in portable ANSI SQL
sqlserver.sqlThe same schema and rows, in SQL Server (T-SQL) dialect
report.jsonStructured conversion report
report.mdHuman-readable conversion summary

How to Export / Obtain Files

  1. In Sage 50, open each list or report you want (Customers, Vendors, Chart of Accounts, etc.)
  2. Export it to CSV (File > Select Import/Export, or the report's Export button)
  3. Create a ZIP archive containing the .csv exports, or upload a single .csv directly
  4. Upload the file or ZIP archive to DataMeans

Supported Features

  • Each exported CSV becomes one table
  • The export's header row becomes the column names
  • Several exports in one ZIP come through as several tables in one job

Known Limitations

  • Only what you export comes through: the .DAT company files and .ptb backups can't be read
  • The export steps above are for Sage 50 US; Sage 50 UK and Canada have different menus
  • Application logic (posting rules, report layouts) isn't migrated, only the data
  • Dates are kept as the export writes them (01/15/2024), in a text column: the export does not say which number is the month

Note on the Excel formats. An .xlsx sheet holds at most 1,048,575 rows of data and 16,384 columns, and a legacy .xls sheet 65,535 rows and 256 columns. Rather than ship a file that looks complete but is silently cut short, DataMeans leaves a table out of any Excel format it does not fit and notes it in the job report. The .xlsx copy is also left out for tables of more than 8,000,000 cells (1,048,575 rows of 12 columns is 12.6 million), which take too long and too much memory to write, and the .xls copy for tables of more than 150,000 cells, which the legacy format takes far too long to write. The CSV, JSON and SQL outputs always contain every row.

Technical reference

Overview

Sage 50 (formerly Peachtree Accounting) is an accounting software package designed for small to medium-sized businesses, with a product lineage reaching back to Peachtree Software in 1978. The U.S. Edition does not use a single database file: each company is stored as a directory of Btrieve record files managed by the Actian Zen database engine (formerly Pervasive PSQL, originally Btrieve), with key indexes maintained inside the data files themselves. General ledger, receivables, payables, inventory, payroll, and job costing modules share this common file set, and data dictionary (.DDF) files expose the records relationally to ODBC and reporting tools.

History and Background

  • 1977: The first Peachtree software is published through The Computer SystemCenter, an early Altair dealer from which the company is later carved out.
  • 1978: Peachtree Software founded in Atlanta by Ben Dyer, Ron Roberts, Steve Mann, and John Hayes.
  • 1981: Peachtree's accounting products are included in the launch of the IBM Personal Computer; Management Science America (MSA) acquires the company in June.
  • 1984: InfoWorld estimates Peachtree to be the world's seventh-largest microcomputer software company, with US$21.7 million in 1983 sales.
  • 1985: Intelligent Systems Corporation purchases Peachtree from MSA.
  • 1988: Intelligent Systems sells Peachtree in a management buyout for $20 million.
  • 1994: Automatic Data Processing (ADP) acquires Peachtree.
  • 1998: The Sage Group acquires Peachtree from ADP for US$145 million.
  • 2002: Peachtree 2002 (version 9) is the first release whose version check accepts the Pervasive.SQL 2000i engine in addition to Btrieve 6.15.
  • 2013: The Peachtree product line is rebranded as Sage 50.
  • 2019: The Sage 50 2020 release upgrades the database engine from Pervasive PSQL v11 to Actian Zen v13.

File Format Specifications

Primary Files:

  • .dat: Btrieve record files, one per record type (e.g., COMPANY.DAT, CHART.DAT, CUSTOMER.DAT, JRNLROW.DAT)
  • .ddf: Data definition (dictionary) files describing tables and fields for ODBC and third-party access
  • .ptb: Company backup file, a Zip-compatible compressed archive of the company's data files

Proprietary Details:

  • Company data is a folder of Btrieve files rather than a single database file; each record type has its own .DAT file.
  • The Btrieve MicroKernel engine stores records and their key indexes together inside each data file, so there are no separate index files.
  • A data file in the 7.x format or later begins with two File Control Record (FCR) pages holding the file size, page size, and other characteristics, followed by page allocation table (PAT), index, and data pages.
  • Page size must be a multiple of 512 bytes, up to 4,096 bytes through the 8.x file format, 8,192 bytes in the 9.0 format, and 16,384 bytes in the 9.5 and 13.0 formats.
  • Maximum file size depends on the format version: 64 GB before 9.0, 128 GB for early 9.x formats, 256 GB for 9.5, and terabytes for the 13.0 format.
  • A key may span multiple segments, with the total key length limited to 255 bytes.
  • Reporting tools such as Crystal Reports read the files relationally through the .DDF data dictionaries.

Supporting Files:

  • .lck: Record-locking files created by the Btrieve engine
  • .ptl: Lock-management files created by Sage 50 itself
  • .ptr: Temporary files created during printing
  • .frm: Customized form layouts, one file per form

Data Types and Structures

The engine stores each record as a byte array; the .DDF dictionaries map record fields to the following Actian Zen (Btrieve) data types.

TypeSizeDescriptionUse Cases
CURRENCY8 bytesSigned quantity with four implied decimal places (Intel binary format)Monetary amounts
MONEY8 bytesPacked decimal with two implied decimal places (same representation as DECIMAL)Two-decimal amounts
DECIMALVariablePacked decimal number, two digits per byteQuantities, rates
DATE4 bytesDay and month as 1-byte values, year as 2 bytesTransaction and due dates
TIME4 bytesHundredths, seconds, minutes, hours as 1-byte valuesTimestamps
TIMESTAMP8 bytesUnsigned count of septaseconds (10^-7 second units) elapsed since January 1, 0001, UTCRecord timestamps
INTEGER1, 2, 4, or 8 bytesSigned whole number in Intel byte orderCounts, identifiers
FLOAT4 or 8 bytesIEEE single- or double-precision floating pointFractional values
BFLOAT4 or 8 bytesMicrosoft Binary Format floating point, retained for legacy dataLegacy numeric fields
AUTOINCREMENT2, 4, or 8 bytesEngine-assigned sequential signed integerGenerated record numbers
STRINGVariableFixed-length sequence of ASCII characters, padded with blanksFixed-width text fields
ZSTRINGVariableNull-terminated C string, maximum 255 bytes including the terminatorNames, descriptions, memos
LOGICAL1 or 2 bytesBoolean stored as a 1- or 2-byte valueFlags, status indicators
GUID16 bytes16-byte binary globally unique identifierUnique record identifiers

Database Structure:

  • Chart of accounts (CHART.DAT)
  • Customer and vendor master files (CUSTOMER.DAT, VENDOR.DAT)
  • Customer bill-to/ship-to and vendor remit-to addresses (ADDRESS.DAT)
  • Journal transactions split into header and row files (JRNLHDR.DAT, one record per transaction; JRNLROW.DAT, one row per financial event)
  • Employee and payroll records (EMPLOYEE.DAT), with per-employee earnings summaries (EARNSUM.DAT)
  • Inventory item records (LINEITEM.DAT)
  • Job cost codes (COST.DAT)
  • Sales tax codes (TAXCODE.DAT)
  • Audit trail records (AUDITTR.DAT, Premium editions and higher)
  • Data dictionary files (.DDF) describing tables, fields, and indexes

Version Differences

VersionYearKey FeaturesFile Format
Peachtree 5.01995Windows 3.1/95 release; versions 5.0-8.0 share one engineBtrieve 6.15 .DAT files
Peachtree 2002 (v9)2002First release to accept Pervasive.SQL alongside BtrieveBtrieve 6.15 or Pervasive.SQL 2000i
Peachtree 20042004Requires the Pervasive.SQL 2000i enginePervasive.SQL 2000i
Peachtree 20072007Bundled database engine updatedPervasive PSQL v9.1
Peachtree 20082008Ships the PSQL v9 Workgroup engine; runs on v10 unsupportedPervasive PSQL v9
Peachtree 20102010Ships with a Workgroup enginePervasive PSQL v10.12
Sage 50 20132013Peachtree rebranded as Sage 50Pervasive PSQL engine unchanged
Sage 50 20142014Ships with the v11 Workgroup enginePervasive PSQL v11
Sage 50 20202019Engine renamed and upgraded; PSQL v11 keys deactivatedActian Zen v13
Sage 50 20232022Engine upgraded; opens release 2022 data without conversionActian Zen v15.1

Compatibility Notes:

  • Company data is converted when first opened in a newer release.
  • Conversion is one-way: the Data Conversion wizard accepts company data only from equal or lesser versions, and a higher edition such as Premium cannot be converted to a lower edition such as Pro, even if the lower edition is newer.
  • Backups can be restored only through Sage 50's own restore function; backups made with other tools are not recognized.
  • Installing the Sage 50 2020 release deactivates the Pervasive PSQL v11 engine keys, so Sage 50 2018 and earlier stop working on the same machine.
  • Each company is stored as a separate directory under the shared data path.
  • ODBC and third-party access depends on the company's .DDF data dictionaries.

Technical References

Questions

What can I convert Sage 50 databases to?

DataMeans converts Sage 50 databases to clean CSV, Excel, JSON & SQL. Each table is exported as its own file, alongside a structured report of exactly what was extracted.

Do I need Sage 50 installed to open my databases?

Only to make the exports. DataMeans reads the CSV files Sage 50 exports, not its company files: the .DAT files are compressed on disk and a .ptb backup is a compressed container, so neither can be read. Once you have the CSV exports, you don't need Sage 50 or any other software.

Can I preview my Sage 50 data before paying?

Yes. DataMeans shows your extracted tables and rows in the browser first, so you only pay when you're ready to download the full CSV, Excel, JSON & SQL export.

Is my data secure?

Yes. Your files are encrypted in transit and at rest, and they're deleted automatically: within 7 days if you don't go ahead with a conversion, and when your download window ends if you do. We never sell or share your data, and we never use it to train machine-learning models.