Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Simple Applications

The sample applications are very simple ones to avoid obscuring the FairCom DB functions. They maintain a simple inventory file, with just one key field. We start with just the basics necessary to start and create a file and index, and gradually add on a variety of functions. This approach lets you study each of the concepts introduced without clutter from non-FairCom DB code, and without the confusion of advanced FairCom DB concepts.

These programs compile in single user, standard multi-user, or client/server mode, without any change to the code. If a function does not apply to a particular mode, such as Commit(), it is ignored. However, more sophisticated transaction functions available with the FairCom Server are not used. The programs that we provide are:

  • lowlevel.c - Creates a data file and index, adds and deletes records using the low-level functions of FairCom DB.
  • isam.c - Identical to lowlevel.c using ISAM functions instead of low-level functions. Shows how the ISAM functions simplify programs. Requires isam.p as a parameter file.
  • isam1.c - Identical to isam.c except that it uses Incremental ISAM structures.
  • isam2.c - Builds upon isam1.c. Lists the file to the screen. Introduces “sets”.
  • isam3.c - Scans the file to find a record. Allows update or delete of the record.

All of these examples are built upon the same program structure, and use the same data, index, and (where appropriate) parameter files. FairCom recommends using ISAM level functionality over low-level. The low-level example is provided primarily to show the advantages inherent in the ISAM level. Unless you have a specific need to use low-level functionality, (i.e., to manipulate data and index entries independently), consider skipping the low-level example.

TOCIndex