Click here to download the Defrag.cpp code.
compile with...
cxx Defrag.cpp -L/usr/cisam/lib -lisam -o defrag
Where /usr/cisam/lib is where you have installed you cisam kernel
Also another usefull util I wrote was cisamrecs. It gets the number of records and file info directly from the CISAM header. It does not count them, so its instant.
Click here to download the cisamrecs.c code.
compile with...
cc cisamrecs.c -L/usr/cisam/lib -lisam -o cisamrecs
Syntax:
defrag [-compress] [-decompress] [-copy] [-tmp ] [-nolock] 'filename'
-compress - sets compress flag
-decompress - unsets compress flag
-copy - once defrag has copied all recs to the temp file temp_fil dont rename it back to the original filename
-tmp - specify temp file name
-nolock - do not try to lock the file exclusivly. Be carefull with this option!!
This command must ONLY be used on files that are not being accessed. It will set an 'EXCLUSIVE' lock on the file.
Once a CISAM file has been 'compressed' PROIV with continue to add to the file in 'compressed' mode.
cisamrecs 'filename'
The command can be run on 'live' files.
For use with multiple files with both defrag & cisamrecs always specify the '.dat' file.
EG
defrag *.dat
cisamrecs *.dat
**********
DISCLAIMER
**********
While I use this on a regular basis on our production system and have made sure there is nothing wrong with the code, If anything 'bad' happens I cant be held responsible!!
Both programs have been tested and run under DEC / ALPHA / TRU64 UNIX. If used on other systems please check first.
Rob D
CISAM Utilities - Defrag & Rec Count
Started by Rob Donovan, Jul 17 2004 12:34 AM
4 replies to this topic
#1
Posted 17 July 2004 - 12:34 AM
#4
Posted 21 October 2010 - 09:37 PM
1- clicking on the download link results in:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
proivrc.com
Thu Oct 21 16:35:12 2010
Apache/2.0.54 (Debian GNU/Linux) FrontPage/5.0.2.2635 mod_ssl/2.0.54 OpenSSL/0.9.7e
2- Rob D - in case those files are just missing, I have a local copy that I could upload. Let me know if you want that done.
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
proivrc.com
Thu Oct 21 16:35:12 2010
Apache/2.0.54 (Debian GNU/Linux) FrontPage/5.0.2.2635 mod_ssl/2.0.54 OpenSSL/0.9.7e
2- Rob D - in case those files are just missing, I have a local copy that I could upload. Let me know if you want that done.
#5
Posted 22 May 2018 - 09:17 AM
Hello Rob
I am trying to uncompress an index.
defrag [-compress] [-decompress] [-copy] [-tmp ] [-nolock] 'filename'
$ defrag -dcompress hacsdx4.dat CISAM version : C-ISAM Version 7.24.UC5 Serial number : Software Serial Number UMD#J999999 Processing File: -dcompress 02: Error Opening File: 2
am i doing something wrong? or is that a bug?
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users