Skip to content

DC305 backup files

A DC305 backup is a copy of a herd’s whole DairyComp 305 database, usually a ZIP archive of DC305’s own data files. It is not a report or CSV; the files are in a proprietary fixed-record binary format that needs DC305 (restore) or a decoder to read.

Typical contents (names vary by version and setup):

File Contents
COWFILE*.DAT Live records: current lactation of animals in the herd
COWFILE*.ARC Archive records: closed lactations and animals that have left the herd
DC305P1*.DAT Further herd data files
*.PAR Herd parameters and setup (codes, settings)
DCINFO.TXT Plain-text summary, e.g. live record count, file size, maximum records
  • One record = one animal-lactation. A cow in her fourth lactation has several records: the current one in the live file and earlier ones in the archive.
  • Records chain by date. Each closed lactation record carries an archive date (ARDAT, a standard analysis item) equal to the next lactation’s fresh date (FDAT); ARDAT = 0 marks the current lactation.
  • Identity = ID + birth date (BDAT). Barn IDs and ear tags are recycled, so ID alone does not identify an animal across years.
  • Item catalogue. The setup defines each item: name (up to 5 characters), type, offset and width in the record. Item numbers and event codes are configured per herd, so offsets and codes from one herd can’t be assumed in another.
  • Stored vs calculated items. Some items are stored in the record (ID, BDAT, LACT, FDAT, RC, PEN, …). Others are calculated at report time and are not in the file at all, for example 305ME, MILK and PEAKM, which are computed from stored test-day and lactation data. “Date of event” items (e.g. a sold date or died date) are looked up from the nth-latest occurrence of an event code.
  • Events are stored in slots on the record: date, event code, a flag, a short remark (about 16 bytes) and a payload such as the technician. BRED events reference a sire table (NAAB code, name, breed).
  • Saved commands (the herd’s reports and exports) are also stored, as fixed-size records.

Dates are stored as day numbers: an unsigned 16-bit count of days since a fixed epoch, 1960-12-31 (day 1 = 1961-01-01), with 0 meaning no date. A 16-bit count runs out about 179 years after the epoch.

CSV exports, by contrast, print dates as MM/DD/YY with a 50-year century pivot, and ”-” for an empty date.

Backups are made from DC305’s backup function (menu or command), often on a nightly schedule, to a local folder, removable drive or sync folder. A restore replaces the herd’s current data with the backup’s.

For most analysis, use exports (FILEOUT or EVENTS\F to CSV or TXT) instead of decoding a backup. Archived lactations are reachable from inside DC305 too: EVENTS\L, BREDSUM\L, GRAPH\L and PLOT\L read the archive files, and \B adds animals that have left the herd. Decode a backup only when you need history that these can’t easily give.

Herd context: any DC305 herd; file sizes scale with herd size and years of archived lactations.

  • A backup holds one live record per animal in the herd and one archive record per closed lactation or departed animal, so archive files grow every year.
  • Backup size ranges from a few MB for small herds to tens of MB for large herds with long history.
  • Treating a backup as CSV, or opening its files in a spreadsheet.
  • Off-by-one dates. Using 1961-01-01 or 1960-12-30 as day 0 shifts every date by a day. Check against a known animal.
  • Reading 0 as a date instead of “no date”.
  • Keying on ID alone. Recycled IDs merge different animals; use ID + BDAT.
  • Looking only at the live file. Closed lactations and animals that left the herd are in the archive.
  • Expecting calculated items in the file. 305ME, MILK, PEAKM and similar must be recomputed or exported from DC305.
  • Assuming another herd’s item offsets or event codes. They are configured per herd.
  • Restoring over live data by accident. A restore overwrites everything entered since the backup.
  • Careless handling. A backup is the herd’s complete record; store and share it as confidential data.