!
! EXPISM - ISAM File Expand/Contract Utility
!
! Program to Expand or Contract an ISAM file to user specified size.
!
! Author: Creed Erickson
! Computer Systems Plus, Inc.
! 1630 Manheim Pike
! Lancaster, PA 17601
! (717) 560-0140
!
! The author assumes no liability for the use of this program for any purpose.
!
! Released to the public domain on 12-June-1986.
!
program EXISM,1.0(1)
! Edit History:
!
! [001] Original Code. 9-Jun-86 / CAE
!
!*********************
!***** NOTICE *****
!*********************
! This program uses ISMROK.SBR which IS NOT a public domain utility.
! ISMROK is part of the "Isam Utilities Package" availible from:
!
! Distributed Management System, Inc.
! P. O. Box 16995
! Irvine, CA. 92713
! (714) 957-1193
!
! This little utility package might seem a bit salty until you use it
! and see how many headaches it saves you. If you do a lot of ISAM work
! I would reccomend you look into DMSI's stuff. I am unaware of other
! widely distributed ISAM utilies of this nature but that doesn't mean
! that they aren't out there somewhere.
!
print
print "Max. number of records in file : ";
print NUM'RECS'ALLOC+NUM'RECS'AVAIL
print "Number of records in use : ";NUM'RECS'ALLOC
input "Number of records for new file : ";NEW'REC'CNT
print
!
! DO SOME CALCS
! (Bibilography: ISAM/LOKSER TUTORIAL, AMTS JOURNAL)
!
if (KEY'SIZE/2) = int(KEY'SIZE/2) then &
ACTUAL'KEY'SIZE=KEY'SIZE else ACTUAL'KEY'SIZE = KEY'SIZE + 1
DIR'ENTRY = ACTUAL'KEY'SIZE + 4
BLOCK'FACTOR = int(508/DIR'ENTRY)
HALF'FACTOR = int(BLOCK'FACTOR/2)
THIRD'LEVEL = &
1 max (int((NEW'REC'CNT-BLOCK'FACTOR+1)/HALF'FACTOR))+1
SECOND'LEVEL = &
1 max (int((THIRD'LEVEL-BLOCK'FACTOR)/HALF'FACTOR))+1
FIRST'LEVEL = &
1 max (int((SECOND'LEVEL-BLOCK'FACTOR)/HALF'FACTOR))+1