SIMPOL Documentation

The Configuration File

The configuration file used by both servers is based on the ini file format. There are two sections in this file. Below is an example of the file format. The file format has changed since earlier versions, but the old format is still supported. Just don't include a cfgversion parameter and don't make use of any of the new parameters.

Example 8.1. A Sample SIMPOL Server Configuration File
[Server]
cfgversion=2
port1=4000
txfactor1=0
#port2=4001
#txfactor2=6
tcpport=4002
logfilename=samplelog.txt
bz2libdll=c:\simpol\bin\bzip2.dll
archiveroot=SIMPOL Data Backup
backupdir=C:\Users\Public\Documents\SIMPOL\backup
title=SIMPOL Server
deflocktimeout=10000000

[Files]
1=c:\simpol\utilities\simpolserver\adrb.sbm,locktimeout=120000000
      

The [Server] Section of the Config File

In the Server section, the port entry can be repeated multiple times, but each must end in a different sequential value starting with 1. The server will listen on each of the ports listed. The txfactor value is used to reduce the transmission speed of the server. This is important especially when working with Superbase clients, where the client cannot process the data fast enough to keep up, resulting in lost packets. Also, when debugging it may be necessary to slow down for SIMPOL to 6 or even 9 or 10. The tcpport is used so that the serverclose.smp (or .exe) can request the simpolserver to shutdown.

As can be seen above, the entries for port2 and txfactor2 are commented out. You don't need port2 and txfactor2 (but you always need both together), unless you are coping with systems with differing network access speeds, like a LAN and a WAN. You might set the LAN txfactor to 0 and the WAN txfactor to 6, for example. Tables with larger numbers of fields can take longer per record, so you may need to increase the txfactor to support the time it takes for the record or file definition to be processed.

The tcpport is used to host a TCP/IP server that can be contacted using the serverclose.exe (or .smp) file. As a seurity precaution, it must be run on the same physical machine or it will be ignored. The command it sends is simply a QUIT message, but this ensures that the server will correctly shut down and flush all changes to disk.

If the logfilename parameter is assigned, then a log will be produced and written to a file of the same name.

When using the guisimpolserver.exe or the simpolserver.exe with the simpolserverclient.exe, the following three entries are required for doing back up and restore of data:

  • bz2libdll

  • archiveroot

  • backupdir

The first provides the name and location of the BZip2 DLL that is used for compressing and decompressing the data files. The archiveroot defines the root file name to which the date and time will be appended. The last item identifies the location where the back up files will be stored.

The deflocktimeout entry allows the lock time out value to be set to a standard value, which will be inherited by all of the entries in the [Files] section, unless expressly overridden.

The [Files] Section of the Config File

The format of the Files entries is as follows: <index value>=<path and filename>, locktimeout=.inf, hidden=f, reccount=f, codepage=850, r=, rc=, rl=, rlc=, rlm=, rld=, rlcd=, rlcm=, rlmd=, rlcmd=. Here they are listed out:

  • <index value>

  • <path and filename>

  • locktimeout

  • hidden

  • reccount

  • codepage

  • r

  • rc

  • rl

  • rlc

  • rlm

  • rld

  • rlcd

  • rlcm

  • rlmd

  • rlcmd

The index value must be in sequential order starting with 1 and not contain duplicates. As soon as a value is missed the program stops reading files.

The path and file name for each *.sbm file adds that container file and all of its tables (except for the system tables) to the server.

The locktimeout value defaults to .inf (never unlocks from the server side), unless it is overridden with a value assigned to the deflocktimeout entry in the [Server] section. This value should be set to be appropriate for the individual table and its use. The value is in microseconds, so to automatically unlock in 12 seconds, use: 12000000. It applies to all tables located in the same container file.

The default hidden value is f (false). To enable it, set it to t (true). Tables can be hidden so that someone connecting to the PPCS server cannot list them. If they know the table name, then they can still open the it, unless it is password protected.

The reccount default value is t. To suppress the determination of the record count for a table, set it to f (false). This will assign the maximum record count to the table and not try to calculate it. On very large tables calculating the record count can take some time, making server starts slow.

PPCS operates in the DOS code page normally (for historical reasons having to do with compatibility with the PPCS protocol of its predecessor (Superbase). The default code page for PPCS is 850 (Latin 1). This can be changed to another code page by setting this parameter. This is the list of supported code pages: 437, 720, 737, 775, 850, 852, 855, 857, 862, 866, 874, 1258.

The r=,rc=,rl=,rlc=,rlm=,rld=,rlcd=,rlcm=,rlmd=,rlcmd= parameters are all passwords. To password protect the database table purely for access, it is only necessary to apply a read password. More fine-grained control can be had using the other password combinations, if desired. The letters stand for the following capabilities with respect to records:

  • r – read

  • c – create

  • l – lock

  • m – modify

  • d – delete

Please note that if you decide to use multiple passwords to access these tables from different users with different access rights, then the program code needs to be able to cope with any errors that may occur.