|
Network Ability
Improvements
Safety Operation
Activation of Network Operation
Exclusive Open Mode
Read-Only File Access
Critical Commands
Increasing File Handles
FATS is standardly equiped for the network environment. Nearly all commands can be executed both in single workstation and network environment.
The network systems Novell, Windows for Workgroups, Bayon Vines, NetBios and all MS-Net compatible networks are supported by FATS. When executing FATS with MS-Windows 3.x or in peer-to-peer networks the MS-DOS program SHARE.EXE has to be loaded. Other networks require own drivers (NETX, ODI).
FATS was optimized for the network operation. Different mechanisms guarantee just as safe as fast processing in the network.
Therefore it is not necessary for the application programmer to develop own network functions for the work with the FATS files
In the network- and single workstation environment FATS offers a very high measure of safety for your data.
After each command that makes changes to the index file all data is immediately written to disk. In addition, FATS does perform the reset disk operations that cause the operation system to flush its cache buffers to the disk and actualizes the directory structure.
Thus it is guaranteed that after the call of FATS all changed data were written on the disk.
Activation of Network Operation
By default the network functionality is deactivated. It can be activated with the Auto Refresh (Y) command (see page 4-77).
Following adjustments activate the network operation:
In order to ensure a network reliable operation, all stations that access the same index file have to use the same adjustment.
The network adjustments presented so far deactivate the cache routines built into FATS in favor of safety operation. These adjustments are useful with files that are constantly accessed by many stations.
In certain situations, e.g. the reconstruction or the reorganization of files or the handling of temporary files, with which only one station has access to a certain file, the cache routines would be desirable.
For these cases adjustments were implemented in FATS, which give exclusive file access rights to a station. The exclusive rights are activated as follows:
The "Y\108" adjustment is equivalent to the adjustment "Y\2" explained on the previous page. The exclusive rights of access make additional locking unnecessary. The "Y\111" adjustment activates the "Server-Flush".
Finally the "Y\106" adjustment delays writing to the file.
A detailed description can be found at page 4-77.
If you open a index file in the read-only mode, your application can only read the file, it cannot perform updates. Any attempt to execute a command that makes changes to the index file will result in an errorcode 25 (write error).
Once a station successfully opens a index file in the read-only mode, others will be able to open the file only if they also use read-only mode.
The read-only mode is activated as follows:
1.) Set read-only file access with Y\107
2.) Open or create one or several index files
3.) Switch back to the normal access mode (e.g. "Y\2", "Y\3")
Each modification of the index file by inserting or deletion of keys makes an internal pointer invalid that is necessary for the commands Search Next (N) and Search Previous (P). You better use the commands Search Next After (A) and Search Previous Before (E) because this can happen in the network environment from any station.
The following commands have to be replaced:
The base version of FATS for MS-DOS has been presented in two different versions:
FATS.OBJ | Works with DOS file handles (DOS 2.x -) (file path can be specified, compatible with FABS Plus 4.x) |
FATS_.OBJ | Works with File-Control-Blocks (CP/M mode) (compatible with FABS 3.x) |
For use in network the first version (FATS.OBJ) is recommended, however you have to pay attention that DOS normally allows only 15 file handles per process. Because your data files need handles to be accessed there are possibly no more handles available to FATS.
Starting with version 3.3 of MS-DOS there is a undocumented command that allows the extension of the handle table. To use this command your compiler may not reserve all available memory, i.e. memory has to be returned to DOS by reduction of the applicationīs heap memory. Please consider your compilerīs documentation for a corresponding command.
Also the FILES= entry in Config.sys has to be assimilated to the increased number of files.
If you want to access more the 15 file in your program you have to effect the following changes in your program:
- If you use SHARE.EXE you have to increase the memory available for file locks with the instruction SHARE /F:nnnnn.
Please consider your MS-DOS manual.
The Novell Netware client for MS-DOS standardly permits 40 opened files.
This also can be changed if necessary.
- Reduce the size of the heap memory available to your application.With BASIC you can reach this by calling the SETMEM function.
- Call the interrupt function 67h of MS-DOS as described in the following example.
Example: (Visual Basic for DOS)
InRegs.AX = &H6700 ' Number of SetFileHandles function
InRegs.BX = 41 ' New number of files (must be odd if it is to work
' with DOS 3.3)
CALL INTERRUPT(&H21, InRegs, OutRegs)
© 2008 GCS Software, Udo Gertz