Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Files.Dat

Mestre-Tramador edited this page Aug 29, 2022 · 1 revision

Dat File

Extension: .dat

The files operated by the Exper-Dat-Reader system.

Description

It consists on a text file where every line holds an info about a seller, a customer or a sale. This infos are separated with a special character and identified by an ID.

Contents

It's worth to note that a Dat file can be easily read by any human or treated like an ordinary .txt file. What matters is the formatting of the content, which looks like the following example:

001ç12345678912çDiegoç50000
001ç32456788654çRenatoç40000.99
002ç23456754345443çJosedaSilvaçRural
002ç23456754334443çEduardoPereiraçRural
003ç10ç[1-10-100,2-30-2.50,3-40-3.10]çDiego
003ç08ç[1-34-10,2-33-1.50,3-40-0.10]çRenato

ID

The ID is the first number on every line of a Dat. The three-digit number determines what the line represents, following the below list:

Separator

The lines, no matter of what ID, hold different infos that must be treated according. What separates these infos is the ç character, and so the order of values indicates what each one is.

Information

The information held by a Dat can be of a Seller, a Customer or a Sale. Each is described below.

Seller

The sellers are the registered employees who sold items to the customers.

The first value after the ID is their CPF, then their name and then their wage.

Customer

The customers are the documented persons who bought items from the sellers.

The first value after the ID is their CNPJ, then their name and then their business branch.

Sale

The sales are a register of what and how much was sold, also by who.

The firs value after the ID is a special ID of the sale, then comes an special array of items, and finally the name of the seller.

Items

The items of a sale are written in their own format, firstly delimited by brackets ([ ]) and separated by commas (,). Then, each group is again separated by a hyphen (-).

At last, the three infos obtained correspond to a special ID of the item, the quantity sold and for what price.

Clone this wiki locally