|
Needed Object Files
To link FATS to your programs you will need the following object modules:
fats.obj The FATS module for DOS fats_msp.obj IBM- MS-Pascal interface "FATSCALL"
The following library is included on the distribution diskette to call the FATS Workstation Engine:
fatsmspr.lib MS Pascal interface
If you want to make calls to the extended version of FATS (FATSXWE.EXE), you have to use the library fatsxmpr.lib instead of fatsmspr.lib.
Linking a Pascal Program with FATS
To compile and link a application that calls FATS, use ONE of the following methods:
1. METHOD: Linking FATS to the program
PAS1 tst1_eng;
PAS2
LINK tst1_eng fats fats_msp;
2. METHOD: Calling the Workstation Engine (FATS_WE.EXE)
PAS1 tst1_eng
PAS2
LINK tst1_eng fatsmspr.lib;or if you own the extended version of FATS: (FATSXWE.EXE)
LINK tst1_eng fatsxmpr.lib;
Calling FATS
FATS commands are executed with the function FATSCALL:
function fatscall (vars szCmnd: lstring; vars nErrorcode: word; vars szFatsKey: lstring) : integer4; extern;
Parameter Usage:
szCmnd Command string (input) nErrorcode Errorcode (output) szFatsKey Key value (output) Return Value: Record Number
Testprograms
The FATS distribution disk for PC-DOS/MS-DOS contains some test programs in the directory DOS_16I\PASCAL/MS that illustrate how you can use the FATS commands in your programs:
tst0_eng.pas MS-Pascal (uses FBSPAS) tst1_eng.pas MS-Pascal (uses FATSCALL) rebuild.pas Re-Indexing a Data File (commands 'BK', 'DL')
The extended version of FATS contains the following additional test programs:
tst2_eng.pas Introduction to the Matchcode Functions mcsort.pas Use of the key-flag with command 'MC' reindex.pas Fast Re-Indexing with the command 'XB'
Compatible Programming Interfaces
You also can use the interfaces provided by the FABS PLUS modules. Please take notice of the additional information at pages 4-77, 9-77, 9-77 and 9-77.
The following FABS interfaces are available:
FBSPAS Entry point in FATS.OBJ FBPAS1 "
© 2008 GCS Software, Udo Gertz