SVBATCH Data Structures
SVBATCH folder structure
The files that SVBATCH produces are stored in the project folder PER.
For each database there is a folder that contains one or more files, each of which represents a table (a list of records). Other folders contain backup and archive copies of the database.
The Database File
This is held in the PER folder of the project: BATCHDB.DAT
It is automatically loaded on startup.
Format of the Parameter File
There is one INFOS.DAT file for each database located in the Database folder. The file contains one line with the following structure:
BASEINFOS, DatabaseName, DatabaseType, NbAttributes, NbBackups, , AttributeMask
Attribute |
Meaning |
DatabaseName |
The name of the database and folder in which it is located. |
DatabaseType |
The type of database. For future use. |
NbAttributes |
The number of attributes configured to be stored. |
NbBackup |
The number of backup copies (in the folder BAK). |
AttributeMask |
A decimal number representing a binary mask that selects which of the attributes are to be used as indices when using the SELECT mode. (#A1 to #A32) |
THIS MASK MUST BE EDITED MANUALLY.
Each attribute that is to be an index is represented by a binary 1. For example,, to use attributes 1, 2, 4 and 5 the mask would be 110011 or 51 in decimal.
When mode SELECT is used, the text attributes used in the search expression must be indexed.
Example
BASEINFOS,DBREPORT,,19,3,,131071
where 131071 in decimal corresponds to the binary mask 11111111111111111.
It indicates that a search expression can be used on the first 17 text attributes. (#A1 to #A17)
Batch Report File
This is in the folder PER\DatabaseName of the project: BatchId.RPT
Attribute |
Meaning |
BatchId |
Identifies a batch. |
The table (.rpt) files
Each table that you create in a database will file in the PER database folder. The file name is of the format TableName.rpt. The files are ASCII and may be opened with a text editor such as NotePad. Each file has the following structure.
BASE, "DatabaseName"
BATCH, "TableNAme",
DATE, "StartDate", "EndDate", "LongVal", "StringVal1", "StringVal2",.., "StringVal32"
There is a line starting with DATE for each record that is created.
Examples of a .rpt file
BASE,Production
BATCH,Machine 1
DATE,01/05/2002 06:00:00:000,01/05/2002 14:00:00:000,,"B100","Nuts","M4","22345"
DATE,01/05/2002 14:00:00:000,01/05/2002 22:00:00:000,,"B101","Nuts","M4","11222"
DATE,02/05/2002 08:00:00:000,02/05/2002 14:00:00:000,,"B102","Bolts","M8","897"
DATE,02/05/2002 14:00:00:000,02/05/2002 22:00:00:000,,"B103","Bolts","M4","5672"
DATE,03/05/2002 14:00:00:000,03/05/2002 22:00:00:000,,"B104","Bolts","M6","1234"
DATE,03/05/2002 14:00:00:000,03/05/2002 22:00:00:000,,"B105","Bolts","M6","5667"
DATE,04/05/2002 14:00:00:000,04/05/2002 22:00:00:000,,"B106","Bolts","M4","9876"
DATE,04/05/2002 14:00:00:000,04/05/2002 22:00:00:000,,"B107","Bolts","M6","5670"
BASE,DB3
BATCH,An2
DATE,08/04/1998 09:44:40:000,08/04/1998 09:48:41:000,1,"PRODUCT1"," PRODUCT2",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
DATE,08/04/1998 09:50:53:000,08/04/1998 09:57:05:000,2,"PRODUCT1", ,"PRODUCT3",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,