FATS - Fast Access Tree System
Table of Contents
 Converting FABS Plus Files to FATS

Converting FABS Plus Files to FATS


 Introduction
 Parameters
 Protocol of Processing


 

 
Introduction

The FATS Toolkit supports a calling interface that is 100% compatible with the program FABS-Plus Net of Computer Control Systems. There is no need to change your source code. You just need to change obj-/dll files to use FATS in existing projects, for example in the MS-DOS environment you only have to replace the FABSP.OBJ module with the FATS.obj module.

In order to obtain a speed increase, a completely new file structure had to be implemented in FATS. With the enclosed converting program it is possible to convert existing FABS Plus files to the new file format of FATS.

On the FATS disk you find the object file FATSCONV.OBJ that you link together with your version of FABS Plus to create the converting program:

LINK FATSCONV.OBJ FABSP.OBJ;

Through it you receive the executable program FATSCONV.EXE.

One of two different steps is necessary to convert the files:

-Files created with FABS PLUS (version 3.x) (param /0)

The data of these index files are devided on two files, one of it has the file extension MAP, the other one has a user defined extension, e.g. ARTICLES.MAP and ARTICLES.KEY

-Files created with FABS PLUS (version 4.x)(param /1)

Starting from the version 4.0 no more MAP files are needed, i.e. all data are in one file (e.g. ARTICLE KEY).

The converting program needs at least 128 KB free memory.
By providing more memory the program makes an additional test of corrupted record numbers, e.g. duplicates.


 

The converting program is started from the dos command line like this:

FATSCONV [device:][path][filespec] [/0, /1 or /8]

Parameters:

/0FABS PLUS files (version 3.x)
/1FABS PLUS files (version 4.x)
/8FABS86 files
/P{filename}While converting a protocol is created by FATS.parameter specifies the filename of the protocol. If you leave the parameter out the file is created with the filename FATSCONV.LST.

If you do not indicate a file specification, all files with the file name extension KEY are converted (*.KEY).

Examples:

FATSCONV /0

All FABS Plus files of the version 3.x with the file extension KEY are converted into the FATS file format.

FATSCONV /1

All FABS Plus files of the version 4.x with the file extension KEY are converted into the FATS file format.

FATSCONV *.INX /1

With this command all FABS Plus 4.x index files with the extension .INX are converted into the new format.

FATSCONV ARTICLE.INX /0

Only the FABS Plus 3.x index file ARTICLE.INX is converted.

The following screen display appears after starting the program:

Current drive/directory: F:\DATA\*.*
——————————————————————— files sorted according to size occupies 39,274,496 bytes
POS     .KEY      1024  01.05.1993  09:42:32             Arch.               1
TIME    .KEY      1024  01.05.1993  09:42:34             Arch.               2
MINORDER.KEY      1024  01.05.1993  09:42:36             Arch.               3
COMMISS .KEY      1024  01.05.1993  09:42:34             Arch.               4
MINDER  .KEY      1024  01.05.1993  09:42:34             Arch.               5
PROJECTS.KEY      1024  01.05.1993  09:42:30             Arch.               6
PERSONAL.KEY      1024  01.05.1993  09:46:04             Arch.               7
BUCHUNG .KEY      7168  09.01.1992  14:07:50             Arch.               8
CLEARING.KEY     11264  04.07.1993  14:29:32             Arch.               9
PRIZES  .KEY     12288  27.06.1993  12:48:22             Arch.              10
LIEFER  .KEY     22528  01.07.1993  10:00:00             Arch.              11
ADDRESS .KEY     24576  27.06.1993  12:56:22             Arch.              12
WARENGRP.KEY     26624  04.07.1993  14:47:56             Arch.              13
LAGER   .KEY    150528  03.07.1993  12:26:56             Arch.              14
ORDER   .KEY    366592  03.07.1993  19:27:46             Arch.              15
VSTAMM  .KEY    992256  04.07.1993  16:40:06             Arch.              16
CUSTOMER.KEY   4345856  08.07.1993  15:49:50             Arch.              17
ARTLONG .KEY   7820288  04.07.1993  19:38:56             Arch.              18
ARTICLES.KEY  25487360  08.07.1993  15:04:12             Arch.              19
————————————————————————————————————————————————————————————————————————————————
                                             Converted:      45945 of   116399
file: ARTICLES.KEY    key    2 of  4          Deleted:              of      243
                                             Checked:       116399 of   465596

The files are sorted by size, i.e. the biggest file is converted last. Because FATS files need more less disk space than FABS Plus files the available capacity of the hard disk should be sufficient.

The files are converted in three passes:

1) Keys are converted into the new format.

2) The integrity of the keys is checked.

3) Deleted records are noted.

The FABS Plus file gets replaced by the FATS file if all of the three passes executed successfully.


 
 
Protocol of processing

While converting a protocol is created by FATS, that can be read in after processing to localize errors.

The result of processing is summarized in a single record of 80 chars for each file:

pos.lengthdescription
113name of file
1410blank
file was correctly converted
*ERROR*
file wasn‘t converted
*WARNING*
file was converted, integrity seems to be doubtful.
244000
file wasn‘t converted
001
file was converted
284Errorcode of FABS-Plus, e.g. "027 "
324Errorcode of FATS
3643Description of error
792ASCII 13, 10

By providing more memory the program makes an additional test of corrupted record numbers which are noted in the protocol as *WARNING*. The affected index file should be reorganized.

FABS errorcode 253 indicates a corrupted or incompatible index file. Maybe a wrong value was specified while starting the program (/0 == FABS 3.x, /1 == FABS 4.x).

The meaning of all other possible errorcodes could be read in the previous chapter.

A typical protocol:

POS.KEY                001 000 000
TIME.KEY               001 000 000
MINORDER.KEY           001 000 000
COMMISS.KEY            001 000 000
MINDER.KEY   *ERROR*   000 253 000 No FABS-Plus file
PROJECTS.KEY           001 000 000
PERSONAL.KEY           001 000 000
BUCHUNG.KEY            001 000 000
CLEARING.KEY           001 000 000
PRIZES.KEY             001 000 000
LIEFER.KEY             001 000 000
ADDRESS.KEY  *WARNING* 001 000 000 record numbers inconsistent !
WARENGRP.KEY           001 000 000
LAGER.KEY              001 000 000
ORDER.KEY              001 000 000
VSTAMM.KEY             001 000 000
CUSTOMER.KEY           001 000 000
ARTLONG.KEY            001 000 000
ARTICLES.KEY           001 000 000


 

© 2008  GCS Software, Udo Gertz