Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

CISAM Utilities - Defrag & Rec Count


4 replies to this topic

#1 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 17 July 2004 - 12:34 AM

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

#2 virus

virus

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 24 May 2008 - 07:53 AM

link broke.. so ultra ~~
email me pls after: sohboonyong@hotmail.com
i wrote a defragment too but waste time... can i differ urs?

#3 apolanco19

apolanco19

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 January 2010 - 08:36 PM

Hello

Link is broken for Cisam utilities. Can you send them to my email: apolanco19@gmail.com?

Thanks

#4 Rob Fantini

Rob Fantini

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 291 posts
  • Gender:Male
  • Location:Haverhill, United States

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.

#5 Rob Fantini

Rob Fantini

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 291 posts
  • Gender:Male
  • Location:Haverhill, United States

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

Click the link below to see the new game I'm developing!