home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbsquash.zip
/
DBSQUASH.DOC
< prev
Wrap
Text File
|
1987-02-14
|
5KB
|
139 lines
DBSQUASH.DOC
Documentation for
DBSQUASH.COM
and
DBSQUASH.BAS
by
Gregory C. Dahl
October 14, 1983
COPYRIGHT (C) 1983 by GREGORY C. DAHL
This program is a small utility for dBASE II (tm)
programmers which compacts .CMD files an average of
35-40 per cent, thereby saving memory and speeding
program execution.
USER SUPPORTED
This program is user supported software. It
is copyrighted and cannot be sold for profit, but
unlimited copies may be made and distributed for
free. Users who find the program useful are
encouraged to send a contribution to the author:
Gregory C. Dahl
4050 Arroyo Trail
Carmel, CA 93923
If this "peoples' marketing" venture is successful,
the author will be encouraged to write and distri
bute more programs in this unrestricted manner,
which benefits everyone. So do your part!
Any contributors who send $10 or more will
receive a diskette containing the latest version of
this program and its documentation, along with
other programs by the same author. Please be sure
to indicate single or double density, and the name
of the program that interests you. Comments on
programs are also most welcome!
Due to possible unforeseen circumstances, the
above offer is subject to change without notice.
WHAT IT DOES
DBSQUASH reads an ASCII file containing your
dBASE II command file, which can be prepared within
dBASE II using the MODIFY COMMAND command or using
a word processor. A new file is created in which
comments, unnecessary blanks, and other redundant
material has been eliminated.
When writing dBASE II command files, it is
very useful to indent lines according to the
program logic. It is also good programming
practice to use comments liberally, greatly
improving the readability of the program (especially
after a period of time!). However, both use up
memory space and dBASE has to write all this
useless material into memory each time the program
executes. Disk swaps are thus greatly increased.
Therefore, after a program is fully debugged it
is desirable to create a streamlined copy with
redundant material eliminated, using DBSQUASH.
All leading blanks and comments beginning
with * are deleted by DBSQUASH. Comments after
ENDIF, ENDDO, and ENDCASE are also eliminated.
Material in single or double quotes is not affected.
NOTE comments are not changed. All spaces before
and after operators and punctuation marks (which
are redundant) are removed. The most common
commands, IF THEY ARE TYPED IN FULL AND IN UPPER
CASE, are shortened to four letters. Thus STORE
becomes STOR, SELECT SECONDARY becomes SELE SECO,
etc.
The program asks for the name of your command
file to be read from. It assumes this file is on
drive B: unless you specify another drive. It then
asks for the name of the file to write to. This
file will be created if it does not exist, and
will reside on the B: drive unless you specify
otherwise. It will have an extension of .CMD
unless you give a different extension. Please note
that you must have two different files with
different names. Thus you cannot start with a
.CMD file and end up with a .CMD file of the same
name. It is recommended that you use the
extension .FUL for your un-squashed command files
to distinguish them from the squashed versions.
As the program executes, it displays the
current line being squashed and running totals for
the size of the file before and after squashing.
At the end, the percentage savings is displayed.
MBASIC AND COMPILED VERSIONS
DBSQUASH is available in two forms: an MBASIC
program and a compiled .COM program. The .COM
version runs almost twice as fast, and is recom-
mended. To execute the .COM version, simply type
DBSQUASH at the >A prompt (CP/M). This is a
complete machine-language program, and does not
need any file with library routines.
To execute DBSQUASH.BAS you need to first
load MBASIC, and then type RUN "DBSQUASH.
PORTABILITY
DBSQUASH was written for the Osborne I (tm)
and uses certain screen addressing commands which
will not work on other machines. With modification
to these commands (which are not essential to
operation), the program should run on any CP/M
machine.
PROGRAMMING SUGGESTION
It is useful to make the first line of
your program a NOTE containing the name of the
file and the date of the last update. NOTES are
not removed by DBSQUASH. This line will help you
to keep track of your files and their revisions.
Your disk drives will be much happier if you
arrange to put your two files (reading from and
writing to) on separate drives, and the program
will execute a little faster.
Happy programming!
Greg Dahl