Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2007-07-26 01:33:03
Size: 2017
Editor: paul
Comment:
Revision 3 as of 2007-07-26 01:33:47
Size: 2015
Editor: paul
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 = Data Structures =  = Data Structures =

Data Structures

CONTROL allows for the maintaining of information for an unlimited number of companies. A number of files are maintained for each company. There are essentially three different types of files used in CONTROL: Master, Transaction and Index.

All data files are a collection of fixed size records. The first few records in a file are reserved for special purposes.

N.B. This level of detail on the file contents generally isn't necessary as the routines used to access the data/index/transaction files are quite stable and the issues are generally more related to changing data record layouts/content.

The first 32 bytes of record 0 (zero) is referred to as the file descriptor block and contains control information pertaining to the file

* size of the static and variable parts of the record

* total record size

* number of free records

* free list pointer, etc (see s_fdblk and s_ifdblk in file://ccdev/std/hdrs/common.h ).

This information can be changed using the program spatch.

The remainder of record 0 is the "control record" - used to store operation modifying parameters which can be changed by CONTROL programs: e.g. drcont is used to alter accounts receivable (debtors) control parameters.

For Master files, the second record in the file (record 1) is usually reserved for the 'default' record which is the record that is 'altered' when a new record is added. Hence default values can be set for all fields that can be accessed in the file maintenance program. (default values can be altered by pressing the DEFAULT RECORD key in the Alter option of the appropriate file maintenance program)

Additions to the file are made to the end of the file, that is the nextavailable record in the file. However, if deletions have been made, then the record used will be one from a list of 'free' records within the file. The beginning of the free list is pointed to by a free list pointer in the control record of the file.

CONTROL/Software/Development/DataStructures (last edited 2016-01-06 03:27:34 by test10)