The CISAM standards

1 The header file
2 What happens when the current key changes on rewrites
3 CISAM autolock / nowait
4 CISAM version 5.0 through 7.1 locking concurrency
5 CISAM version 7.2x locking concurrency

Upgrading from CISAM™

The process of upgrading from cisam should be as simple as relinking with the new library, however there are a few things you will need to sort out first.

1 The header file

isam.h is the CISAM standard header file, the DISAM equivalent is head/iswrap.h

You have three basic alternatives:

  1. Modify your application code to include iswrap.h in place of isam.h
  2. (Move aside and) replace isam.h with a copy of iswrap.h
  3. Create a new copy of isam.h which does nothing more than include either iswrap.h or a renamed or relocated copy of isam.h, based on an #ifdef condition. This would permit you to easily switch back and forth, as needed.

2 What happens when the current key changes on rewrites

The best way to explain this is by example. Assume you have a file containing the following records: AAA, BBB, CCC, EEE, and that the current index is based on these values.

Under cisam, if AAA was the current record and you were to change it's contents to DDD and rewrite, an isread or isstart with a mode of ISNEXT would set the current to EEE.

This can be somewhat problematic if you are doing a read next loop through your file, so we have arbitrarily adjusted this behaviour to ensure that the next record found will follow the current as set before the rewrite.

This means that, given the above example, BBB would become current on an isread or isstart with a mode of ISNEXT.

The same (in reverse) is true when reading backwards through the file with a mode of ISPREV.

We currently consider this behaviour to be an enhancement over the cisam standard, but would be happy to provide true cisam operation if anyone should ask for it. please contact the support department if this is important to you.

3 CISAM autolock / nowait

For cisam compatible nowait on open and automatic record locks set C7NOWAIT to 1 in isconfig.h

4 CISAM version 5.0 through 7.1 locking concurrency

For cisam version 5.0 through 7.1 locking concurrency, when running in parallel with cisam binaries, set C7LOCKING to 1 in isconfig.h

Please bear in mind that binaries linked against a library with C7LOCKING set to 1 will no longer run concurrent with binaries linked against standard DISAM locking.

5 CISAM version 7.2x locking concurrency

As above, except C7LOCKING should be set to 2.