-
DISAM
DISAM History, complete The first DISAM was released in March of 1988. This hisitory commences with Version 5. -------------------------------------------------------------------- september 24th, 1995 - version 5.93 - first official release --------------------------------------------------------------------- --------------------------------------------------------------------- october 3rd, 1995 - version 5.94 --------------------------------------------------------------------- this version incorporates the initial release of variable length data records, and two minor bug patches relating to data record locks and natural order read/search. --------------------------------------------------------------------- october 8th, 1995 - version 5.95 --------------------------------------------------------------------- this version includes an optional administration facility to keep track of active isam file descriptors. the administration facility allows the library to keep track of duplicate opens on isam files and to share a single pair of system file handles between duplicate instances of the same file. ISMAXFILES and ISMAXLK are now redundant, and the associated tables are now dynamically allocated, meaning that the number of open files and the number of active record locks is now only limited by system resources. the initial beta version of the transaction processing module is included. this version features an enhancement over the original disam code in that it supports virtual open/close within transactions. any attempt to close a file that is part of an active transaction will be deferred until the transaction is complete. if you chose to reopen the file within the same transaction, the virtual handling system will just pass you back the same handle you were using before. this, in theory, should help to correct the EMFILE errors inherent in the original disam versions. refer to trans.ref for details. the test/user.c executable has been enhanced slightly in that it can now make system calls (sys) and run rudimentary scripts (run). --------------------------------------------------------------------- october 16th, 1995 - version 5.97 --------------------------------------------------------------------- featuring a number of adjustments and enhancements to the variable length option, and the implementation of a fairly rigorous storage checking/statistics facility in ascheck. the remainder of the changes cover basic adjustments for portability and a degree of cleanup and optimisation in the remainder of the code. --------------------------------------------------------------------- october 31st, 1995 - version 5.98 --------------------------------------------------------------------- initial beta - threadsafe and threadproof handling - see thread.ref for more details. implemented true support for duplicate opens within the same process. record locking on duplicate handles is honoured, and locks will not be lost when a duplicate handle is closed. isrecover now returns appropriate error codes on failure. --------------------------------------------------------------------- december 15th, 1995 - version 5.99 --------------------------------------------------------------------- essentially a collection of adjustments based on beta test reports. added isprecious() and islockcheck() options to the wrapper code. --------------------------------------------------------------------- january 2nd, 1996 - version 6.0 --------------------------------------------------------------------- the updates in this version consist of the inclusion of the isCluster and isAudit calls, documented in base.ref and audit.ref respectively. --------------------------------------------------------------------- january 28th, 1996 - version 6.1 --------------------------------------------------------------------- the transaction processing module has been upgraded to comply with the current cisam standard, and includes full support for variable length records. disk i/o has been improved (at the expense of an extra chunk of memory) and the lock time on the file log reduced. added ISDUPLOCKS option to the configuration options to permit cisam (non xopen) functionality with regard to duplicate opens in the same process - see entry for version 5.98 for more detail. please note that ISDUPLOCKS should not be set to zero when porting do DOS, Windows, OS/2 or non ELF versions of Linux. if this is a problem to you, please contact Byte Designs. the flag structure in the index header that denotes ISMASKED files has been changed. this means that masked files built before this release are no longer compatible. the fixflags utility in the util directory will patch existing files to comply with the new method. added isindex, ispop, iscopy and isclone calls - see upgrade.ref for further details. the ascheck utility now includes a -B option to allow specific indexes to be rebuilt without disturbing the remainder. see ascheck.ref for more details. --------------------------------------------------------------------- february 5th, 1996 - version 6.2 --------------------------------------------------------------------- isClose now returns a boolean TRUE or FALSE rather than the original NULL pointer. this change is specific to the base library and does affect the standard interface. base and wrapper function prototypes are now C++ compatible. added isseekey() to the wrapper library. ascheck now does index/data mismatch checking - slower but better. aslist in the util directory is an incomplete but fully functional means of listing the contents of an isam index file. added isPush and isPop to the base library. added threadsafe isvbuild to the wrapper to allow building variable length files without the use of the global isreclen variable. added isWrCurr and iswrcurr to the base and wrap libraries. added isfilter (wrapper only) and islkcall (inhouse only) pure index files - see pure.ref transparent file links - see link.ref stubs for isstat variables - see status.ref added ISRDONLY mode in isopen for handling read only files. --------------------------------------------------------------------- february 14th, 1996 - version 6.4 --------------------------------------------------------------------- null key masking - see nullkeys.ref custom key extensions - custkeys.ref RLE compression option for variable length - ISVARIABLE in install.ref renamed isLockMode and islockmode to isSetMode and issetmode. implemented ISSYNCWR mode in open and build - see base.ref upgraded isprecious logic to complete implementation adjusted isGoto to not return an error if file not open for reading. --------------------------------------------------------------------- version 6.5 was an interim release, changes from 6.4 covered below. --------------------------------------------------------------------- --------------------------------------------------------------------- february 14th, 1996 - version 6.6 --------------------------------------------------------------------- threadsafe transaction processing module - beta only - see trans.ref for details. added ISVARCMP mode on isbuild to allow runtime compression flagging on variable length files, adjusted variable length compression handling, and added ISNOCARE option to isOpen to allow easier handling of varlen files - see varlen.ref for details. reworked threadsafe duplicate open handling. added EINTR handling to lockmode 2 for threadsafe, and allowed multiple lock fail codes to be specified in isport.h stchar arguments were reversed, and the float machine independant routines now have float arguments rather than double. open and build now allow the lock mode to default to ISMANULOCK if not specified. adjusted isStart behaviour to match cisam standards. cleaned up a number of compiler warnings. --------------------------------------------------------------------- march 22nd, 1996 - version 6.7 --------------------------------------------------------------------- allow varlen compression to be specified on a per file basis, see varlen.ref implemented ISNOCARE open mode to make it easier to open unknown (varlen or fixlen) files. also modified isgetmode to get all open mode bits rather than masking out only the lock mode, and adjusted issetmode to accept an unmasked mode value without complaint. see varlen.ref added common dictionary access - see wrap.ref, should be of value to those converting from old disam. error code offset value define - see install.ref added varlen and varcmp mention in ascheck. display contents of known key types in aslist. user info pad in index headers - see info.ref --------------------------------------------------------------------- april 10th, 1996 - version 6.8 --------------------------------------------------------------------- adjusted ISDUPLOCKS 1 mode to disallow erase/rename on files already open in the current process - DUPLOCKS 0 retains original behaviour, but be warned that a sequence of open, erase, write, close will result in data loss - see install.ref and caveat.ref for details. added isdi_kdsc() to the wrapper library - see wrap.ref library expiration date option - see expire.ref --------------------------------------------------------------------- may 3rd, 1996 - version 6.9 --------------------------------------------------------------------- added NPARTS define for cisam/xopen compatibility. completed ISDATAVOID conditioning in the wrapper interface. added missing TNULL key compression option. corrected STRINGTYPE key loading bug. added missing key description validity checks. no longer legal to erase the last remaining index in a file. overflow on opening files with too many indexes no longer fatal. isdelcurr will now fail after isstart first/last. adjusted error return code in isrewcurr and isdelcurr on empty file. corrected dislocation problems caused by use of is_recnum(). revised error return conditioning in isread and isstart to ensure appropriate error returns under various conditions. isread ISNEXT now returns current after ALL isstart operations except isstart ISNEXT. corrected non-portable bug when selecting descending order indexes. adjusted isgoto to handle natural order index properly. isolated natural order current. null flag in stfltnull and stdblnull should not have been a pointer. aspack was not handling null primary indexes properly. --------------------------------------------------------------------- august 18th, 1996 - version 6.10 --------------------------------------------------------------------- much pruning and transplanting.. the source is now distributed in two flavours - standard unix format, and a dos/win/os2 version. both are generated from the same meta source but contain unique platform extensions. base/ismemory.c and wrap/stdmif.c must be added to make/project. now only four headers. isconfig.h is common to all, isbase.h and iswrap.h as before, iscustom.h is optional. isport.h is gone, as is ISPLATFORM. BSD extensions and threadsafe configuration are now in isconfig.h added isLockCheck to the base interface, parallel to islockcheck in the wrapper. the base now has it's own mif calls - ldInt, stDblNull, etc, and these have been wrapped for access from the standard interface. added isErrno, isErrio, isRecNum, isRecLen, isSetRec, isSetLen calls to base. additional support for DLL compilation included, see dynamic.ref for more details. additional support for microsoft windows added, see windows.ref for more details. misc/dbmemory.c is a debugging replacement for ismemory.c, see same for comments and usage. added ISLOCKING 3 for dos based systems and support for 'lowest common denominator' NFS based configurations. the built in check call prototypes, codes and structures are now included in both the base and wrapper headers, and ischeck.h is no longer provided or required. entry function prototyping has been revised to provide more flexible support for building dynamic link libraries. the general lock handling scheme has been revised somewhat to cover requirements arising from the ISLOCKING 3 option. corrected a relatively obscure memory under-run bug in the tree pruning module. added isLastRec(), isGetLastRec(), isSetLastRec() to the base, islastrec(), isgetlastrec(), issetlastrec() to the wrapper. must add base/islast.c and wrap/stdlast.c respectively to make/project to use. undocumented (as yet) added base library file descriptor sanity checks corrected invalid eof on read next after adding records to an empty file. pure indexes not following isfirst/isnext rules after delete and erase corrected. transaction processing - commit/rollback was failing when no updates made within transaction. isStart/isstart should not allow the user to set keylength greater than the length of the selected key. isCopy/iscopy was reporting a bogus error on success. build and addindex were being a bit too fussy about the contents of a null key descriptor. isindexinfo and related were not counting null primaries. lock handling not releasing internal record lock state flags under some situations. ------------------------------------------------------------------------------ october 16th, 1996 - Version 6.11 - James Knight bids his official farewell ------------------------------------------------------------------------------ Byte Designs assumes ownership of Disam96 - changes to copyright/banners ascheck, aspack and aslist references changed to dcheck, dpack and dlist respectively ------------------------------------------------------------------------------ sept 1st, 1997 - Version 6.12 ------------------------------------------------------------------------------ dec modules standardize to fit disam96 function prototyping isclone ensures null primary is cloned compnext now returns FALSE if no current record isopen reuses system fds on failure dpack copies unique ids on rebuild dcheck added -q quiet mode option iserrno initialization on successful return int64 support for maintenance of large files, ISHUGE 1 in isconfig.h cisam version 7.1 locking concurrency added, C7LOCKING 1 in isconfig.h rewnxt/RewNxt now correctly returns EENDFILE rather than looping on last record extensive transaction processing rewrites cisam 7.1 no-wait on open and automatic record locks, C7NOWAIT 1 in isconfig.h cisam isstat cobol variables implemented ------------------------------------------------------------------------------- may 1st, 1999 - Version 6.13 - Client / Server ------------------------------------------------------------------------------- client/server capability - see client.ref file mirroring capibilty - see mirror.ref ------------------------------------------------------------------------------- january 15th, 2000 ------------------------------------------------------------------------------- addtional c-isam behaviour implementations - C7NOWAIT set to 1 ISSKIPLOCK and no skip on locked records fix to ensure deletions of compressed index values don't cause uncompression of previous index values to bump past end of node - caused 105 EBADFILE errors ------------------------------------------------------------------------------- may 1st, 2000 ------------------------------------------------------------------------------- c-isam version 7.2x locking concurrency support isconfig.h - C7LOCKING setting should be set to 2 ------------------------------------------------------------------------------- july 5th, 2000 ------------------------------------------------------------------------------- added the utility - dsplit - allows a large file to be split into two smaller files. ------------------------------------------------------------------------------ january 16th, 2001 ------------------------------------------------------------------------------ added libinfo structure in association with new subroutines isLibInfo() and islibinfo(). isLibInfo()/islibinfo() when called with an empty libinfo pointer, will load the libinfo structure with the expiration date, if set, the library compilation date and the number of clients if set. added asplog flag to ensure that socket error reporting within the client code, is logged to a file rather than displayed. new functions, AspGet() and AspSet( int flag ) in the base library code and, aspget() and aspset( int flag ), will set and report the current value of asplog. several refinements to the client/server code..extensive log reporting. added dstat utility that reports library statistics, see dstats.ref for more information. --------------------------------------------------------------------------- may 1st, 2001 --------------------------------------------------------------------------- added auto repair for index/data corruptions that may occur if a process is killed or if a system failure occurs. see repair.ref and ISREPAIR setting in isconfig.h ---------------------------------------------------------------------------- september, 2001 ---------------------------------------------------------------------------- added ISCISAM 2 option - same as ISCISAM 1, ie. mimic C-ISAM behaviours, but with the addition of ENOCURR on isread/ISEQUAL failure. duplicate count logic - rev.2 - isgrow.c effected. added check for ISWAIT on AUTOLOCK open with ISCISAM > 0 or ISNOWAIT 1 ---------------------------------------------------------------------------- november, 2001 ---------------------------------------------------------------------------- isIndexInfo/isindexinfo - EBADARG(102) when file opened with other than ISINOUT versions effected: 6.12 unix and MS, 6.13CS unix and MS - isinfo.c isupdate.c, isdelete.c - increased allocated size of oldpad buffer general reorganization of rewrite() and delete() routines for better efficency.c versions effected: 6.12 unix and MS, 6.13CS unix and MS added more functionality to ISAUDIT - additional options 2 through 7 see audit.ref tune which operations are audited, see audit.ref for options versions effected: 6.12 unix and MS, 6.13CS unix and MS isconfig.h, isdelete.c, isupdate.c and iswrite.c ---------------------------------------------------------------------------- january, 2002 ---------------------------------------------------------------------------- addition of remote system functions - eg. fread, fwrite etc. ---------------------------------------------------------------------------- may, 2002 ---------------------------------------------------------------------------- ISKCOMP - compile time flag - isconfig.h - see compkey.ref for details isprune.c replacement to correct index count and fatal errors encountered during continuous rewrite cycles where the key values are effected ---------------------------------------------------------------------------- aug, 2002 ---------------------------------------------------------------------------- isadmin.c - correction to reference ADM(id)->isam->openmode should read ADM(did)->isam->openmode isrepair.c - modifications to correct repaired writes isadmin.c, iserase.c - iserase() failure caused admin table corruption isdelete.c - drop record lock prior to adding record number to free list ---------------------------------------------------------------------------- sep, 2002 ---------------------------------------------------------------------------- isprune.c - corrected bug that caused index mismatch errors under certain conditions ISLOCKING 3 on unix platforms would incorrectly initialize isam->iserrno to 0, overwriting a valid error value isadmin.c - dup struct pointer not freed on open failure, corrected ---------------------------------------------------------------------------- nov, 2002 ---------------------------------------------------------------------------- isprune.c - dupnum calculation on insertion into new root corrected ---------------------------------------------------------------------------- jan, 2003 ---------------------------------------------------------------------------- isbuild.c, isopen.c, isopen.c and isbase.h - added CISAM compatible ISSEMILOCK. see #define SEMILOCK in isconfig.h ---------------------------------------------------------------------------- feb, 2003 ---------------------------------------------------------------------------- issystem.c, isconfig.h, iswrap.h, isbase.h, stdwrap.c and stdwrap.h added ISEXTENDED compile time option to allow for extended lock reporting when locks are blocked by other processes. see read/extended.ref ---------------------------------------------------------------------------- mar, 2003 ---------------------------------------------------------------------------- isIndexInfo/isindexinfo - EBADARG(102) when file opened with other than ISINOUT versions effected: 6.12 unix and MS, 6.13CS unix and MS - isinfo.c ---------------------------------------------------------------------------- may, 2003 ---------------------------------------------------------------------------- ISCISAM > 0 check for natural order - isread.c ISCISAM > 0 allow ISOUTPUT record locking, ie. isLock()/islock() ---------------------------------------------------------------------------- aug, 2003 ---------------------------------------------------------------------------- isconfig.h - D3XAUTOLOCK set to 1 in isconfig.h prior to compiling the library will enable older D-ISAM v3.x behaviour releasing record locks on subsequent read, update or delete ischeck.c - additional check for last datfree corruption ---------------------------------------------------------------------------- jan, 2004 ---------------------------------------------------------------------------- isgrow.c - change to satisfy C-ISAM bcheck higher level node ordering problem did not effect the integrity of the isam file or Disam96's ability to maintain the file. ---------------------------------------------------------------------------- feb, 2004 ---------------------------------------------------------------------------- isread.c - change to ensure partial key searches are C-ISAM compatible when ISCISAM set to non-zero Note difference between C-ISAM and Disam96 in the following scenario. Set key compare length to partial key length via isstart() Given 3 records with key values of 1110, 1120 and 1130 setting compare length to 1 will result in isread/ISFIRST - first record with key 1110 is returned isread/ISGREAT - iserrno 111 - ENOREC - Disam96 Since only the first byte of the key is compared and none are greater than the value of 1. With C-ISAM the isread/ISGREAT will return the key 1120 record, which means the isstart setting of partial key length compare to 1 doesn't have any effect. ---------------------------------------------------------------------------- mar, 2004 ---------------------------------------------------------------------------- isgrow.c - previous change to satisfy C-ISAM bcheck not quite correct for uncompressed keys - refined/corrected. compressed key logic correct. ---------------------------------------------------------------------------- jul, 2004 ---------------------------------------------------------------------------- isadmin.c - rewrite of dup mutex handling on failure. Mutexes were being unlocked rather than destroyed on function failure, isAdmFail isentry.c - reversal of isAdmFail() and isDropLock() in isFail(). mutexes were being destroyed before being unlocked. This problem first appeared on Itanium where stricter control of mutexes exist. All platforms effected. isread.c - ISCISAM 2 specific - ensure check for ISPATH->recnum is only done when reading by index and not for natural or record number order reads. ---------------------------------------------------------------------------- sep, 2004 ---------------------------------------------------------------------------- iserase.c - Correction of bug that allowed erase/rename of locked file. ---------------------------------------------------------------------------- nov, 2004 ---------------------------------------------------------------------------- isread.c - change in ISCISAM 2 ENOCURR check ---------------------------------------------------------------------------- aug, 2005 ---------------------------------------------------------------------------- isadmin.c, stdextra.c, isbase.h - changes to correct isAdmFail master lock end rather than drop. addition of new function isThreadedDone()/ isthreadeddone() to drop master lock. application code should call isthreadeddone() prior to the application exiting..closing to isthreaded() call. ---------------------------------------------------------------------------- oct, 2005 ---------------------------------------------------------------------------- isaudit.c - changes to correct behaviour to conform to C-ISAM/X-OPEN, original behaviour can be reinstated by defining D96ORIG in isaudit.c ---------------------------------------------------------------------------- feb, 2006 ---------------------------------------------------------------------------- islock.c - correction to only set bit in lkstate for lock all and not record ---------------------------------------------------------------------------- sep, 2006 ---------------------------------------------------------------------------- isprune.c - reset node->recnum after compressed key delete ---------------------------------------------------------------------------- nov, 2007 ---------------------------------------------------------------------------- isbase.h,iswrap.h,isread.c - isStart() added C-ISAM ISKEEPLOCK functionality isopen.c - ensure isAdmClose if isopen fails while logging in progress isvarlen.c - allocation of isam->hashtab changed from hardcoded 4 to sizeof( long * ), to ensure proper support of platforms where long is > 4 bytes, namely native 64bit environments. ---------------------------------------------------------------------------- jan, 2008 ---------------------------------------------------------------------------- istrans.c - replaced missing call to isVLread in log_vdel routine to ensure isrollback() reinserts variable length portion of deleted record. ---------------------------------------------------------------------------- jan, 2009 - offical release of DISAM v7.0 new to this release ---------------------------------------------------------------------------- isopen.c, isbuild.c, isvarlen.c, isvarlen.h and isconfig.h - changes to variable length idx file format to allow for > 16777216 record limit when storing record numbers in 3 char bytes for varinfo and continuation node pointers. isconfig.h setting ISOLDVARLEN 1 or any non 0 ISCISAM setting will maintain old disam/c-isam variable length file format compatibility. ISCISAM 0 and ISOLDVARLEN 0 ensures new format. new format requires that dvlrebld( see dvlrebld.ref ) be run on existing variable length files. stdextra.c - schema/record layout support - new wrap functions load schema from isamfile to path/filename ISD1 int ISD2 isldschema( int isfd, char *path ) dump schema from isamfile to stdout ISD1 int ISD2 isdpschema( int isfd ) store schema from loadfile to isamfile ISD1 int ISD2 isstschema( int isfd, char *loadfile ) remove schema from isamfile ISD1 int ISD2 isrmschema( int isfd ) isschema.c - schema record layout support - new base functions load schema from isamfile to path/filename ISD1 int ISD2 isLdSchema( IsFile *isam, char *path ) dump schema from isamfile to stdout ISD1 int ISD2 isDpSchema( isFile *isam ) store schema from loadfile to isamfile ISD1 int ISD2 isStSchema( IsFile *isam, char *loadfile ) remove schema from isamfile ISD1 int ISD2 isRmSchema( IsFile *isam ) * see read/schema.ref for function details and schema/ReadMe for sample programs dreport.c - new schema related isam data reporting utility. record number limit changed from LONG_MAX to ULONG_MAX value client/server capabilities incorporated into standard DISAM. for a limited single client server program please contact ByteDesigns. ----------------------------------------------------------
DISAM History, Version 7 jan, 2009 - offical release of DISAM v7.0 new to this release ---------------------------------------------------------------------------- isopen.c, isbuild.c, isvarlen.c, isvarlen.h and isconfig.h - changes to variable length idx file format to allow for > 16777216 record limit when storing record numbers in 3 char bytes for varinfo and continuation node pointers. isconfig.h setting ISOLDVARLEN 1 or any non 0 ISCISAM setting will maintain old disam/c-isam variable length file format compatibility. ISCISAM 0 and ISOLDVARLEN 0 ensures new format. new format requires that dvlrebld( see dvlrebld.ref ) be run on existing variable length files. stdextra.c - schema/record layout support - new wrap functions load schema from isamfile to path/filename ISD1 int ISD2 isldschema( int isfd, char *path ) dump schema from isamfile to stdout ISD1 int ISD2 isdpschema( int isfd ) store schema from loadfile to isamfile ISD1 int ISD2 isstschema( int isfd, char *loadfile ) remove schema from isamfile ISD1 int ISD2 isrmschema( int isfd ) isschema.c - schema record layout support - new base functions load schema from isamfile to path/filename ISD1 int ISD2 isLdSchema( IsFile *isam, char *path ) dump schema from isamfile to stdout ISD1 int ISD2 isDpSchema( isFile *isam ) store schema from loadfile to isamfile ISD1 int ISD2 isStSchema( IsFile *isam, char *loadfile ) remove schema from isamfile ISD1 int ISD2 isRmSchema( IsFile *isam ) * see read/schema.ref for function details and schema/ReadMe for sample programs dreport.c - new schema related isam data reporting utility. record number limit changed from LONG_MAX to ULONG_MAX value client/server capabilities incorporated into standard DISAM. for a free limited single client server program please contact ByteDesigns. -----------------------------------------------------------------------------
This problem may be occurring in other Linux type distributions as well.
If you're running a multi-threaded DISAM program on Linux Ubuntu, with multiple processors and are seeing what appears to be a deadlock scenario, try switching to the latest Ubuntu 9.1. We have been able to confirm that some kernel versions that run NPTL threads on multi-processor systems run into what appears to be a bug in the kernel or NPTL threads library, specifically a futex_lock failure that kills the thread leaving other waiting threads in a permanent wait condition. To date we have not been able to duplicate this bug with the latest version of Ubuntu 9.1, specifically kernel 2.6.31-14 server. NPTL version 2.10.1.Is D-ISAM compatible with Informix C-ISAM?
D-ISAM 3.x, DISAM96 and DISAM7 are all file compatible with C-ISAM. D-ISAM 3.x, DISAM96/DISAM7 will run concurrent locking with C-ISAM Version 4.1 executables. DISAM96 and DISAM7 allows for configuration settings that will enable concurrent locking with C-ISAM 5.1 and greater. ( Currently this applies to unix fcntl() environments only ) This is only of importance if you are planning to run C-ISAM executables against D-ISAM/DISAM96/DISAM7 executables. The D-ISAM 3.x calls and DISAM96/DISAM7 wrap calls are fully compatible with the standard C-ISAM isam function calls.- Performance ComparisonsSome Performance Comparisons between D-ISAM Version 3.x, DISAM96 and Informix' C-ISAM 4.x
Tests were 15000 cycles run on an Intel Pentium-133 running SCO Unix ODT-5
I'm sure I have compiled the library properly, and I'm sure I have compiled and linked my application properly but nothing seems to work correctly.
A. Ensure your including the correct header information, if compiling or converting from C-ISAM you'll need to change references from isam.h to disam.h ( versions 3.x ) or iswrap.h ( DISAM96/DISAM7 )..or simply create a dummy isam.h that only includes #include or .B. Disam requires that that library be compiled with signed char types as the default. Ensure the compiler is defaulting to signed char types on compile or set the compiler flag that generates signed char types by default.
I'm sure I have compiled the library properly, and I am sure I have the right linker commands, but I keep getting unresolved references to the base ( isXxxx() ) library functions.
DISAM96/DISAM7 specific - If you're linking wrap ( isxxxx() ) calls then it is possible your linker resolves references canonically - in a single pass through the listed libraries. Linker objects should be listed in order of precedence - object module(s), wrap lib, base lib.What's involved in converting from C-ISAM or D-ISAM 3.x to DISAM96/DISAM7?
If converting from C-ISAM to D-ISAM 3.x the only change you will need to make is to create an isam.h that only includes . Compile the D-ISAM 3.x library and recompile your application code and link to the D-ISAM library.If converting from C-ISAM or D-ISAM 3.x to DISAM96 or DISAM7, you will need to ensure that references to isam.h or disam.h are replaced with iswrap.h. DISAM96 and DISAM7 no longer use the isfdmap structure that is internal to D-ISAM 3.x, DISAM96 and DISAM7 provide analogs for some of the more common values via common dictionary access routines.
- What are the maximums allowable with DISAM?Most maximums such as file sizes/open files and such are determined by the os. DISAM96/DISAM7 will allow index sizes limited only by the index block factor, to increase the default maximum for the index size increase the ISIDXBLK default setting by increments of 512 bytes..the default is set to 1024 and allows a max index size of around 990 bytes. DISAM96/DISAM7 as of version 6.12 allows support for files greater than the standard 2 gig limit for those operating systems that support int64 types.
DISAM sets no limits for the number of indexes in a file or the number of parts per key.
- What are the differences between DISAM 3.x and DISAM96 and DISAM7?DISAM96 is a complete rewrite that resembles D-ISAM 3.x in almost no way as far as the actual code is concerned. DISAM96 is cleaner, more efficient code with many added options such as multithread capabilities, large file support for platforms that allow > 2 gig file sizes, locking compliance with both C-ISAM 4.1 as well as C-ISAM 5.0 and 7.1. (C-ISAM changed locking schemes as of 5.0 ), full cobol isstat variable support, MF cobol filename support, and ease in compilation of both static and dll libraries for MS platforms.
DISAM7 is the latest DISAM next generation of DISAM96. DISAM7 allows twice the number of data records compared with D-ISAM and DISAM96. DISAM7 allows for isam file schema storage within the isam file, formated reported output of data from the file via the schema as well as an enhancement to the C-ISAM limit on variable length record max, see dvlrebld.ref for more details. - Rebuilding and reclaiming space using Disam's dpackWhen a record is deleted from an isam file, it is marked for deletion in the .dat and the corresponding index values are physically removed from the index node. ( One 512 or 1024 block = one index record ). When an index node becomes empty due to all key values in the node being deleted, then the node itself is removed from the .idx file.
At any time an index node may or may not be full, if a deletion leaves space in an index node..that space will only be reused if a new record insert has a key value that would compare as next or prev against existing key values in that node. In other words an index node (used bytes) shrinks or expands( up to 512 or 1024 max bytes ) due to deletions and insertions. An insertion does not reuse any available index node with available space..it must be the index node where the comparable key values reside.
Depending on the index values on new record inserts, index node space that has been freed from previously deleted entries may not ever be reused unless new key values compare as the next key value to an existing key value in that node.
There is no ratio or percentage that can be assumed about how much unused space is in a index node. That depends on the entries deleted and subsequent inserts if any. If all records in a file are removed the .idx file will shrink in size because nodes will be empty and empty nodes are physically deleted.
The only way to pack both the .dat and .idx is to run Disam96's dpack program.
- Size of resulting index versus size of data
512 index node size, dup width of 2 bytes and assuming no index compression: 100 byte key value, with 2 keys
one 512 byte node would be allocated for every 4 - 100 byte index values ( there is extra space per node 2 bytes for the #bytes used in node as well as 4 bytes per value for record# and 2 bytes per value for dup# ) so 10 records of 100 bytes would mean 4 index values per node = 3 nodes * 512bytes * # file indexes
key length - 100 bytes + 4 bytes - record# + 2 bytes - dup# ---------- 106 bytes per index value 512 - index header record + 3 * 512 - 10 index values for key 1 + 3 * 512 - 10 index values for key 2 --------- 3584 bytes for index values + header record for .idx file and 101 per data record * 10 records = 1010 bytes for the .dat file. 1024 index block size and 4 byte dup width ( now standard ) 9 index values in 1 node, another node for the 10th value 1024 - index header record + + 2 * 1024 - 10 index values for key 1 + 2 * 1024 - 10 index values for key 2 --------- 5120 bytes bytes for .idx
Once a node is full, that node is split into to 2 nodes and another level node is created. This forms the index chain. The first node is the level 0 node and level 0 nodes point directly to data records. Higher level nodes point to the index record of the lower level node in the index chain.