Please refer to Installation manual for activation and configuration details.
The following provides a list of the functional and programmatic differences between fixed length and variable length isam file handling.
If you are using the base interface then isReclen( isfd ) is used to read the current record length, and isSetlen( isfd, len ) is called to set it.
You can also read and write isfd->isreclen directly.
If you are using the wrap interface then isreclen is a global integer used to pass variable length info around in much the same way as isrecnum.
The parts of any key added must reside within the fixed length part of the record.
You can add ISVARLEN to the mode argument to create a varlen file, in which case the record length argument must define the maximum possible length of the records.In the wrap API you must set isreclen to the size of the fixed length header portion of the record.
Key fields can only reside in the fixed length portion.
You can also use ISVARCMP in place of ISVARLEN to specify that RLE compression be applied to the data.
isvbuild should be used in place of isbuild if you are creating variable length files in a multithreaded environment.
If file is variable, the msb of di_nkeys will be set to indicate same. di_recsize contains the maximum record size, the fixed length size is returned in isreclen.
If the file is variable length you must use ISVARLEN in the mode, or else isOpen will return an EBADARG error. The inverse is also true - if the file is not variable length, then specifying ISVARLEN will return the same error. If successful then isreclen will be set to the maximum record length of the opened file.To get around the inconvenience of the above, you can use ISNOCARE in the open mode, in which case the file will be opened regardless of whether it is variable or fixed length. You can then check the open mode value to determine which kind of file was opened. This is found in isam->openmode if you are using the core (base) library calls, or loaded by means of isgetmode( int isfd, int *mode ) if using the classic (wrapper) library.
isreclen will be set to the actual size of the record just read.
isRewCurr, isRewRec, isRewrite, isWrCurr, isWrite
isrewcurr, isrewrec, isrewrite, iswrcurr, iswrite
These all expect isreclen to be set to to the actual size of the record, before calling.
This will check the integrity of the varlen storage in an ISAM index.
The library provides optional RLE compression on the variable length portion of the data record. This is specified when creating the file by using a mode flag of ISVARCMP in place of ISVARLEN.
Please note that ISVARCMP and ISVARLEN are NOT additive - you must use one or the other, not both.
Once a compressed varlen file has been created, you can use either ISVARLEN or ISVARCMP when opening the file - either will work, and the file will be opened in the appropriate mode.
Please note that RLE encoding is only valuable if your data has a fair distribution of repeated zero (0), decimal zero (48), or space (32) bytes.
Compression is transparent to the application - records are written and read as before.
Compression is a Byte Designs feature, and is not cisam™ compatible.
The check utility will analyse and test the variable length storage nodes and report statistics.