Working With Data Files

Top  Previous  Next

 

All of your shop information is stored within the data files.  These  are listed in the file structure listing of this chapter.  In  addition there are several memory files, with an extension of .MEM,  but these should not be modified.

 

File Structure

Files are long listings of information.  If you took a piece of  tape, stretched it out for a mile, and then started on the left end  writing data, you would have a sample file.  Whenever new data is  added, it fits at the end of the current information.

 

The first part of the file is called a header.  It stores the format  of the file, how many "fields" are included, their type, and their  size.  A field is space for information.  Each field has a name,  type (date, character, numeric, or logical), and a size.  There may  be many fields for a file.

 

Information that is written to a set of  fields is called a record.  When you add parts to a workorder, each  item is stored in a record.  As you will see, the part file has many fields.  Each stores a specific fact about the part you have added  to the workorder.  The information entered into these  fields  makes 1 record.

 

The Auto Shop Writer writes the information end-to-end,  with no dividing marks.  The header tells the computer how to break  the information into records, and fields.  When you look at the file structure listing, you will see the file  title.

 

All files have an extension of .DBF which is the standard  for dBASE compatible file structures.  In some cases, you will see  a memo field listed.  This data is stored in another file, by the  same name, except with a .FPT file extension.  If you run a DIR on  the \ASW9s subdirectory, you will find all of these files listed.

 

The purpose of each file is specified on the first information line below the name.  You will find that some jobs have been divided  across multiple files, ie. workorder information.  This permits  system speed and efficiency. The Auto Shop Writer files use special indexes to find records more  quickly.  These files, sometimes referred to as "keys", have an .CDX  extension.  The structure listing shows indexes as front/back.  The  front name is the field name within the file on which the index is  built.  The back name is the actual name of the index file.  Sometimes these will be the same.  The workorder file has a key file  built on the workorder number.  The data is located in the wrkord  field, and the index is stored in a file called abaord.ntx.  Every field has a name, type, and size.  The names are chosen by the programming staff, and relate to their purpose.

 

The Auto Shop Writer  field names are usually six characters in length.  There are four  types.  The most common are Character, which stores text, and  Numeric, which stores numbers which may be calculated.  You will  also see some Date fields, which hold dates in the format  month/day/year.  The Logical fields hold a Yes (true) or No (false)  value.  Finally, the Memo fields call a special memo file, which  stores all of the special notes you have written.  A brief statement follows each field's size indicating the type of  information stored.  This should be helpful should you choose to  work with your files using other access programs.

 

File Maintenance

Files can be maintained using external programs such as Visual Fox Pro 6, Visual dBase ( Windows ), dSalvage, and the dClip Edtior (DOS).   Instructions are provided with these programs for their use.

 

It is important to exercise great care when working on data files using external programs.  It is important to first create a backup of a file before making any changes.  In addition, it is vital that the person working on the file fully understand the purpose of all fields, and the data contained therein, to be sure to avoid breaking links or making data inconsistant.

 

Extracting Data

Using external programs it is possible to copy data from a system file to a special file which can then be used for reporting and research properties.  For example, using dClip, one might copy workorder records for a fiscal year to a special file which can then be opened by a spreadsheet program ( ie. Excel ).  Projections can then be made based on manipulating data within that spreadsheet.

 

To extract data, one would first open the data file with dClip, or Visual dBase, and then build a querie to isolate the desired records.  Then the selected records would be copied to another file, but they would also remain in the system file.

 

Never use the system files to provide information directly to other programs.

 

Working With Other Programs

Any program which can interface with a .DBF/.FPT/.CDX  format can be used with data files from The Auto Shop Writer.  Some of the more common programs are dClip, Visual dBase, and Visual Fox Pro.

 

Many spreadsheets and word processors also will directly import, and convert, .DBF file data for their usage.  Consult the package details to see if they will work.

 

You should always work with copies of your data files.  Some programs will actually damage your file structure, making it unuseable.  This is because they do not support the "FOX Pro data drivers".  They may end up modifying the headers of the file, thus losing data, or full access.

 

Custom Reports

Custom Reports can be created using special programs that read the .DBF/.FPT file structures used within The Auto Shop Writer.  Consult the documentation for these products for specific guidelines for extracting the data and constructing the reports.