home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
datamage.zip
/
DOCS.ZIP
/
MAIN.DOC
< prev
next >
Wrap
Text File
|
1991-09-26
|
43KB
|
795 lines
WARRANTY AND DISCLAIMER
If this program is found to operate improperly by a registered user H.C.W.P.
software will provide a corrected version of the program to that user for the
price of a suitable, postpaid diskette mailer and a PC formatted diskette
delivered to us, or $8.
NO OTHER WARRANTY IS MADE, expressed or implied. This package represents over
six years of work by a single programmer. I have done my best to make
something I'd be proud to show. If you find anything I've missed I'd really
appreciate knowing about it!
THE DATAMAGE data management system
DATAMAGE is, at the very least, completely different. It's not a dBase clone,
Lotus copy, RIM database subset, etc. The DATAMAGE data management system is
designed to be fully and easily assimilated by what we call "your average
clerical employee."
The faculty provided by the system is computerized data storage and retrieval.
Unlike the worthy (and sometimes lofty) competition it is not necessary to
"write an application" of/with DATAMAGE in order to begin using it. The only
thing that needs to be set up is the datafile.
DATAMAGE first time use is documented by the file MAGETUTR. The automatic
installation batch files display this file, the user prints it, then the system
is started by the batch file. The MAGETUTR file introduces the DATAMAGE
structure and some of it's capabilities. If you have not used this file it's a
good place to begin.
To use the MAGETUTR tutorial after the initial installation of DATAMAGE change
into the \MAGE directory and enter LEARN. The batch file will re-display the
tutorial, which can be used as many times, by as many people, as necessary.
DATAMAGE system specifications:
DATAFILE TYPE - flat, headerless. Compatible with MICROSOFT C and BASIC.
NUMBER OF DATAFILES - No limit
MAXIMUM RECORD SIZE - 10 Kbytes (10,240 bytes)
RECORDS IN DATAFILE - 32,000
RECORD NUMBERS - mandatory, unique
FIELDS IN RECORD - 200
MAXIMUM LENGTH OF STRING FIELD - 250 characters
NUMERIC CAPACITY - 17 digits
DECIMAL PRECISION - user selected or floating point
FILE INDEXES - five fields per file
FILE INDEX TYPES - Unique, Cross or Non-unique
BINARY INDEXES - up to 50 per file
BINARY INDEX FIELDS - up to eight per index
STATIC RELATIONALITY - none
DYNAMIC RELATIONALITY - up to eight datafiles
SYSTEM RECOVERY OF REORGANIZED DATAFILES - yes, provided no fields referenced
in MACRO or APPLICATION have been deleted.
dBASE FILE COMPATIBILITY - no
DATA IMPORT - yes, from dBase formatted files
DATA EXPORT - no
MULTI-USER (lan) CAPABILITY - no (version 4.4 will be lan compatible)
THE PROGRAMS AND THEIR FUNCTIONS:
1. BASE.EXE is the battlestar program of DATAMAGE. It lists and displays
records, enters new records, updates records, and sorts the records in the
datafile and can perform calculations to extrapolate data. This program
employs direct disk access and maintains ram-based numeric counters to
provide the fastest d.m.s. environment going.
2. CONVERTR.EXE imports data from dBase formatted files. Please see
CONVERTR.DOC for the way to convert a dBase file which is a two step process.
3. DBSEMAKR installs user-designed datafiles. The documentation for DBSEMAKR
is found in the file DBSEMAKR.DOC. The basics of computerized data storage and
retrieval, as well as datafile design, are described in BASICS.DOC.
4. POWRCOPY moves data between datafiles. It can be used to merge two or more
datafiles, or to accomplish inter-datafile updates. Real-life uses of this
program would include the moving of certain parts of a sales history or
customer file into a new datafile designed for sales mail management, or
updating the "master" datafile from details of daily transactions entered as
records on other computers.
5. POWRMAIL.EXE is a sales mail manager. This program is not an integral
part of the DATAMAGE. In fact, it is a custom expansion program developed to
meet the need of one of the first users of THE DATAMAGE. It is included
not only to provide the freebie proffered on the box, but to show how a
stand-alone, independent program can inter-act with the DATAMAGE.
6. APCNMAKR.EXE is the DATAMAGE application generator. APPLICATIONS MAKER is
a rather advanced program, and makes rather heavy demands of the user as a
result of it's power.
As usual within DATAMAGE, there is no syntax to learn and no text file to
write. Please view the APCNMAKR.DOC file in C:\MAGE\DOCS for complete
instructions for this program.
7. GO.EXE is the function selection program. It allows the user to select
multiple functions without leaving the system.
DOCUMENTATION:
Each program except BASE.EXE has it's own doc file. These files can be found
in the \MAGE\DOCS directory. There is even a program designed to display/print
the docs: VIEW.EXE To familiarize yourself with it's (rather self-explanatory)
operation change into this directory and enter SEE_DOCS. The batch file will
display documentation for the program to display the documentation.
BASE PROGRAM:
This file continues with the documentation for BASE.EXE program - the workhorse
of DATAMAGE. This program is very general in nature, and can be put to as many
uses as their are users of it.
MODES OF OPERATION:
The BASE program can be operated, step by step, via the keyboard. The
functions of this program are accessed by pressing the appropriate key, usually
a function key. The assignment of the function keys are detailed below. All
of the twenty-two functions available from the BROWSE screen, as well as those
available from the record display-update screen, have their own on-screen help.
When you press their associated keys the opportunity to display the help for
the function will be presented.
In most real-life situations there will be the need for repetitive operations;
Operations that are done frequently. To free the user of having to do
repetitive operations by hand, time after time, the BASE program supports
MACROS. The MACRO records the functions you choose to do your operation, the
order in which you use them, and the parameters you supply to them.
Once recorded, a MACRO can be "replayed." The operation is available as a
whole. These user-defined operations are invaluable in that they provide speed
and also allow those who are, perhaps, incapable of doing the operation step by
step to get the job done.
The third operation mode supported by the BASE program is the automated
execution of a MACRO via command line argument. This allows you to incorporate
the program and a MACRO into a batch file or menuing system. To run BASE with
a command line MACRO you should always execute the program from DOS (menu
system, batch file, etc.). NEVER supply command line arguments intended for
BASE to the GO program.
Let's say you have a datafile in which you keep your invoices from your
suppliers, and a macro to separate, sort and list those invoices currently due
and payable. Your datafile is named INVOICES and your MACRO is names PAYABLES.
By starting the BASE program with the command BASE C:\MAGE\INVOICES\PAYABLES
you may automatically execute your MACRO, and thereby obtain it's output.
It should be noted that, in order to identify a valid MACRO command line
argument, BASE looks for a backslash ( \ ) in it. If you have a floppy disk
with a datafile recorded in the root directory and you specify A:PAYABLES on
the command line the program will not execute the MACRO. Use A:\PAYABLES.
If the program can't find the datafile you will get a disk error. After
attempting to retry the operation and continually getting disk errors you will
be obliged to select the abort option. The program will then end by returning
to MS-DOS command level.
If the program can't find the MACRO you will also get a disk error. After
giving up and selecting abort, the program will return to the BROWSE screen.
This distinction is made to help you figure out what went wrong - perhaps you
have deleted the macro, or made a keying error in the command line argument.
When the command line argument is given the program will execute the MACRO,
then return to MS-DOS command level. If you are using a batch file it will
continue without user intervention. If you are using a menu system you will
return to it. In any case, the program will NOT return you to the GO.EXE
(function selection) program as it does upon normal termination.
BASE PROGRAM FUNCTIONS:
F1 = ENTER FUNCTION: Press to enter a new record.
F2 = DELETE FUNCTION: Press to erase a record. Records can be deleted from
the current group, or erased in the datafile. The latter is irreversible. You
may also delete all the records in the current group. Be careful with this
one. It could be disastrous!
F3 = PRINT FUNCTION: Press to output all records now in the group to the
printer. Data fields in the Input/output group will be printed, data fields
not in the I/O group will be suppressed.
F4 = PRINT FORMAT FUNCTION: When sorting or performing calculations, it's
handy to have a file format sheet. It details the file. The FILE MAPs are
also quite useful while originating APPLICATIONS with APPLICATIONS MAKER.
F5 = FIND FUNCTION: Press to find a record or place in the current order.
The find record function operates, like many other DATAMAGE functions, upon the
current group of records. The record you seek may be in the file, but not in
the group of records you have established via the select records functions. In
that case you will not be able to find the record. Pressing ALT + F-1 will
restore all your records. Then you may find it with the FILE indexes.
This function finds records or sequences. It has three types of INDEXES that
it can use. The user-assigned RECORD NUMBERS, while not really an index as
such, constitute a UNIQUE INDEX that is always present in nay DATAMAGE file.
The FILE indexes are datafiles on disk. The BINARY indexes are the product of
the SORT function (described next) and need no disk file. But you may opt to
record the BINARY indexes to disk. See the MARKER function, F-10.
FILE INDEXES:
The file indexes are declared when the datafile is designed. In the datafile
named FILEINDX.RAD there are ten bytes of data for each record in the main
file. If you declared no fields as indexed when you designed your file then
there will be no index file, and the find records function, file index feature
will be off line while the datafile having no file indexes is loaded.
To find a record via the FILE indexes you select option 2 from the dialog box
after pressing F-5. You are prompted for the content of the target record in
each of the indexed fields. To bypass a field just hit return. When you have
entered all indexed fields the search is executed on the data you entered.
If no match is found it will beep you, and offer to retry the search. If a
match is found one of two things may happen: If you entered sufficient data to
absolutely identify the record, i.e. the content of one field indexed as unique
or all fields indexed as cross, you will return to BROWSE with your flasher on
the record, if possible in the middle of your screen.
If you entered the content of a field or fields indexed non-unique, or only
some of the cross-indexed fields the record will be read in and displayed.
After you exit the record you will choose whether to continue the search.
BINARY INDEXES:
The BINARY indexes are COMPLETELY different. They can be used to find a record
but to see them is this light is to mis-understand them, and thereby get less
use from them. The BINARY indexes are about ORDER.
Let's say you have your datafile in order on two fields. You opt to search
BINARY and, like the FILE index search, you are prompted for the two fields.
The first difference in the BINARY search is that you can't skip a field. If
you hit return on a field the search is executed on the data you entered. The
second difference is in what happens if you don't find a match.
If you enter data that finds no match the BINARY sort will produce the place in
the current order where the data you entered WOULD be. Because of this you can
use the BINARY search to simply go somewhere in the BROWSE display.
When using the BINARY search to find records it's up to you to determine
whether or not your search found a match. The BINARY search is so often used
to find sequence, as opposed to matches, that it does not announce a no-match.
Match or no, your BROWSE simply moves to the place in the current order that
your entries produce.
DATAMAGE requires no disk file to do BINARY processing. You may, however, use
the MARKER (F-10) function to record your BINARY index to disk. See the MARKER
file function description for how to maintain MARKERS to store BINARY indexes.
During the BINARY search you are not afforded the option of ignoring case and
or spacing. In order to create an index to search BINARY you will need to
place the target records in order on your choice of fields via the SORT
(F-6) function. Then the targets of your BINARY search will be the same
fields, counter or even record number you chose to order your records.
When you do your sort you will decide whether or not to ignore case on all
string data, and you may also ignore spacing unless you are using the name
field option. The name field sorts can not ignore spacing as this would render
the sorting target a continuous string from which it would then be impossible
to separate first and last names.
When you search this index your choices of ignoring case and spacing will be
displayed. You MUST use these choices when the index is searched. You can not
opt to ignore case/spacing in the search and then exactly match it while
searching the datafile as these choices affect the order produced in the index.
F6 = SORT FUNCTION: Press to put the current survivor group in order. This
function allows three basic targets: The data in the file, the user-assigned
record numbers and the counter fields. If the record numbers or counter fields
are selected the sort, on a single target, is executed.
If file data is selected you have several options. If your target is string
data you may select name-field or as numeric sorting. You may select up to
eight target fields of any data type, in any order. Be aware, though, that
using lots of targets and having lots of records will cause the sort to take
LOTS of time.
After the sort the BROWSE screen will display the records in whatever order you
have placed them. The target of the sort is now the target of the BINARY
SEARCH which is described above.
F7 = ALPHANUMERIC SELECT FUNCTION: Press to select records by alpha-numeric
criterion. In a name/address file, we wish to work with only those records
in which the title field holds the data "PRESIDENT".
First, we must define the target of the search. You may search either one
field in the records, or all fields defined as string. In this case, we know
where the data is, in a field called title, number three. So, we specify
number three as the target of the selection process.
We can match upper/lower case letters and ignore all spaces in our search, or
we can have the computer look for strict equality. Likewise, we can specify an
instring search, and get as survivors all those records that contain the search
string, or specify equality, and end up with those records exactly equal to the
search string. Then, we enter the search value: PRESIDENT.
Finally, we specify that we want the survivors to contain the search value. We
could reject all records containing the search value as well.
The selection crucible now loads all records in the current group, and tests
field three to see if the search value is there. After the browse screen
returns we look in the survivor records and find a goodly number of VICE-
PRESIDENTS may have been included if an instring search was performed.
F8 = NUMERIC SELECT FUNCTION: Press to select records by numeric criterion.
In a customer file, there is a field called amount due. If we wish to work
with a group of only those records in which the balance is now greater than
zero (accounts with a balance outstanding) we can use the numeric select
function to reject those records having have a zero balance.
Like the calc routine, the num-select function first asks for the whereabouts
of the value to be tested. In this case, say, the amount due field is number
four. So, we direct the computer to look for the test value on disk, in
field four.
Next, we must choose a comparison mode. Since we want only the records holding
a value of greater than zero, we select the greater that option from the menu.
Finally, we must specify the whereabouts of the comparitor. In this case the
test value is the same for all records, zero. So, we specify a keyboard entry
as comparitor, and enter zero.
When the selection crucible starts each record now in the group is read into
the buffer, and it's test value compared to the comparitor. If the record
"fails" the test it will no longer appear on the browse screen, and will not be
accessed by proceeding selection processes, nor appear on reports generated by
the print function, or acted upon by the calc function. For all intents and
purposes, a non-survivor record is not in the file, at least, until the group-
reset function is used.
F9 = CODE FUNCTION: Press to write a code to any field in all records in the
current group. The records containing the code or flag can then be identified
by it's presence. Like F10, this function is used to identify a group of
records not in memory. When records are identified in this manner, the
identification stays in the records until removed.
F10 = MARKER FUNCTION: Press to write/load a MARKER file, or to restore the
remaining records to the current group.
There are times when we want to work with multiple groups. The current group,
and even it's counter values, can be shuffled off to the disk drive, to be
re-loaded when needed. Thus freeing the RAM for another group. The MARKER
files are also useful to pass your group of records to another program and to
record BINARY indexes.
The MARKERs needn't contain all the records in the file, and can be re-loaded
and used without doing any searching of indexes, etc. These MARKER files offer
much more facility than what databases call indexes.
When re-loaded, the browse function will display only those records that were
present at the time of the write, and data in the counter fields, if saved,
will be restored to the values stored at the time of the write.
One use of the MARKER files is to pass a group of records to the POWRMAIL
program. The POWRMAIL program loads the MARKER file, and prints sticky labels
for the records included in it.
The MARKER files are transient, and probably won't be any good tomorrow. They
contain the INTERNAL record numbers of the group, and, tomorrow, that internal
record number may represent another record that may not meet the parameters
specified. This happens when a record is deleted. A "hole" is created in the
file. When the next record is entered, the computer searches for "holes"
before accessing more disk space. If it finds one, it is filled with the
record to be added.
There is, however, a way to permanently define a marker file. Simply make a
MACRO that processes the file and creates the marker. Run the macro whenever
you wish to use the marker.
MAINTAINING BINARY INDEXES ON DISK:
DATAMAGE's BINARY indexes are just as loose as the rest of the program. Unlike
many other programs, in which the fields comprising the BINARY index must be
declared at file definition and require bulky B-TREE disk files, DATAMAGE gives
you the power to index your file any way you wish, any time you wish. There
is, however, a small price to pay: The other programs keep their disk files up
to date (as you wait). DATAMAGE does not automatically update files, as it
does not require them.
Once a BINARY INDEX is active, via sorting the current group or loading a
MARKER file, it is automatically maintained in MEMORY. If new records are
entered or existing records updated and written to disk they will be placed in
their proper place in the current order. But it's up to you to write the index
back to disk, by pressing F-10 and re-writing the MARKER file, and sooner or
later you'll forget. No big deal.
RESTORE REMAINING RECORDS OPTION:
To RE-INDEX a file simply load your most recent MARKER. Then press F-10 again,
and use the restore remaining records option. It will append any new records
since the writing of the MARKER to the group, and all records will then be in
the group. Now you can re-sort them. It won't take NEARLY as long as your
initial sort because most of the records are in order, thanks to your old
MARKER FILE. The sort routine, having little to do, will do it quickly.
Having re-created your BINARY index in memory, hit F-10 and write it to disk.
ALT + F1 = GROUP RESET FUNCTION: Press to restore all records to the current
group, and reset counters to 0. To access, press Alt + F1.
ALT + F2 = INPUT/OUTPUT FUNCTION: Press to adjust the content of the I/O group
(see glossary).
ALT + F3 = CALCULATE FUNCTION: Press to perform a calculation. The entire
screen will clear, and menus will guide you through the many possible ways
you may calculate.
The calc function first asks the whereabouts of the first value, the one to be
acted upon. The data must be numeric, and may be on disk, stored in one of the
two "counter" fields provided in RAM for each current survivor record, or it
may be a keyboard entry.
Next, we enter the desired process, i. e. add, subtract, etc.
Then, depending on the process selected, we may enter the whereabouts of a
second value, which may be the same as the first value. If we simply want to
move a value, say, from counter one to field eight in the file then we enter
the whereabouts of only the first value. If we want to add fields four and
eight, we must enter the whereabouts (field eight in the file) of the second
value as well.
Finally, we are asked to specify where to place the results of the calculation.
We can write it to disk, or place it in a counter field, in RAM. Only the
records in the current survivor group will be calculated. Non-survivors are
ignored by the calc function.
ALT + F4 = TOTAL-AVERAGE FUNCTION: Press to total or average any numeric
field. Note that only the records now in the survivor group will be
totaled or averaged.
ALT + F5 = RE-NUMBER FUNCTION: Press to change the user-assigned record number
of the record whose number is flashing.
ALT + F6 = POSITION FUNCTION: Press to enter the position in the file to which
you wish to go. If you are now at position 30, and want to go to position
4,000, that's a lot of PgDn keystrokes. This way, you move directly to the
desired position.
ALT + F7 = CHANGE MAIN DISPLAY field: Press to see other data than the first
field in line one of the browse screen. Myself, I kind of like to leave the
record name up there, and assign the alternate display field. The main display
area will not accept zero (be turned off).
ALT + F8 = CHANGE ALTERNATE DISPLAY field: Press to change the alternate
display, which is a blank line when the program starts. Some folks like it
that way, saying it makes the display easier to read. For that reason, you
may turn it off. You may also display the counters in the alternate; this
can't be done with the main display area. The alternate display area is
automatically set after you do a sort, perform a calculation or select records,
displaying the target data.
ALT + F9 = LOAD FUNCTION: Press to load another file and the menu detailing
the datafiles on the target disk re-appears. Select another file and press
return.
ALT + F10 = QUIT FUNCTION: Press to end the BASE program and return to the
function selection menu, from which you may exit THE DATAMAGE.
CTRL + F1 = BEGIN and END MACRO RECORDING: (Ctrl + F1) Press to record the
proceeding multi-record functions into a re-usable macro file. If you had
a datafile detailing your customer base you might well wish to have a listing
of those who owed you, possibly broken down into states or whatever.
Next week, you need the same information from the file. After doing it
manually until you are certain of your method, use F21 to make a macro of the
operation.
CTRL + F2 = EXECUTE A MACRO: (Ctrl + F2) Press to run a macro. As you will
see, DATAMAGE runs in the hammer lane.
RECORD DISPLAY/UPDATE FUNCTIONS:
Press RETURN to display/update the highlighted (flashing) record on the BROWSE
screen. The screen clears, and is filled by the names of the fields in the
file, and the data recorded in the record accessed. The dialog box now shows
more functions accessed, this time, by the first (CAPITAL) letter.
QUIT FUNCTION: Press to end display of current record, and return to browse.
If you have changed the data on the screen, using the QUIT will NOT write your
update(s) to disk.
WRITE FUNCTION: Press to write the data on the screen to disk in the record
number appearing on the screen. The routine will check the indexes, if any,
and refuse to write a duplicate.
RESET FUNCTION: Press to reset flashing field to original or merge value.
Original value will appear unless another record has been merged.
PRINT FUNCTION: Press to output the current record to the printer.
MERGE FUNCTION: Press to load another record. This record's data is made
available to move into the current screen with the RESET function.
CREATE FUNCTION: Press to write the data on screen to a new record. A number
for the new record is entered, and the indexes, if any, are checked for
duplicates. The routine will refuse to write on index violations, and display
the offending index.
DATA ENTRY/UPDATE FUNCTION: Press RETURN to enter/update the flashing data
field. The dialog box clears, and the first line details the field accessed,
while the second line lists the cursor movement keys.
The last line has the available functions. If the field is numeric, the Add,
Subtract, Multiply and Divide functions are present. These functions emulate a
calculator, with its' register loaded to the value stored in the field.
When the field contains the desired data, press RETURN to end edit.
GLOSSARY: computer buzzwords as defined in this package.
ABSOLUTE field NUMBERS: This is a number assigned to each field as it enters
the file. If a field is deleted it's absolute number is never re-used. These
numbers give DATAMAGE the ability to execute operations that reference fields
in files that have been reorganized.
APPLICATION: An application is a file generated by the APPLICATIONS MAKER
program. This may be likened to a computer program, though it lacks some of
the major characteristics of same. It is, however, a way to design and
implement your own processes using most of the capabilities of DATAMAGE.
All applications have the file extension .APL, preceded by a user-assigned
filename. They also contain a user-originated description of up to thirty-five
characters, which is displayed in a menu by the APPLICATION MAKER program.
AUTOEXIT.MAC: The AUTO EXIT MACRO automatically executes every time a user
leaves the datafile after entering, deleting or editing records. It is used to
keep MARKER FILES up to date.
BINARY INDEX: A BINARY INDEX is an order of the records in the current file or
survivor group. The field(s) upon which the records are ordered are selected
by the user. The record numbers and the counter fields may also be used as the
source data for a BINARY INDEX.
Unlike the FILE INDEX, the BINARY INDEX may, or may not, be recorded to disk.
CASE/SPACING: If you direct the program to ignore case and spacing then
entering `fredjones' will include records containing FRED JONES, Fred Jones,
and Fred JONES. If you opt for strict equality only those records containing
an exact match of the search string will be placed into the group.
CLASS: fieldS can have one of four formats: Numeric fieldS store numbers.
Numeric dollar format fieldS are processed as any other numeric field, but
will appear on reports formatted with $ , commas and two decimals. String
fieldS store words as well as numbers, spaces, etc., and date fieldS store
dates, in either of the popular formats.
COUNTER field: One of sixty-four thousand double precision variables provided
in RAM or on disk to hold the results of calculations done on the data in the
datafile. Two counters are provided for each survivor record. They can be
considered as the numeric fields that aren't there, but can still be used.
CROSS-INDEXING: When a field is declared as cross-indexed, it is
combined with all other indexes declared as cross-indexed to form a unique
index. For example, we might have a datafile compatible with the POWRMAIL
format in which we also keep our customer billing data. Realizing that we may
have two customers with the same name, and that we also might have two
customers at the same company with the same phone number, we could create a
cross index on this file that combined the name and phone number fields.
That way, the computer wouldn't balk if we tried to enter two records with the
same name, or the same phone. But, if we tried to enter a record that had
duplications in both the name and the phone number, it would be rejected.
When you are searching the datafile for a record the indexes operate
independently of each other; you may select any, all, or any combination of
the fields declared as indexed. Case/spacing can also be ignored when
searching indexes, but will be STRICTLY MATCHED when entering records.
DATAFILE: First and foremost, a datafile is a disk file. All datafiles
produced by this program are called YOURDATA.RAD. A datafile is divided into
records, which are divided into fields. A datafile can contain 32,000
records, that can contain 200 fields, each.
A datafile can contain any information. From recipes and their ingredients, to
the kilotonage of a nuclear blast produced by varying quantities of fissionable
material.
DATAFILE DEFINITION: Once a user datafile has been designed, the DBSEMAKR
program will write the datafile definition to disk. To define a new datafile,
use DBSEMAKR.
DATAFILE DEFINITION FILES: The diskfiles HEADINGS.SAD, KEY.SAD and
CTRLFILE.RAD comprise the datafile definition files. The file HEADINGS.SAD
holds the names you give to the fields in the datafile. The file KEY.SAD
holds four numbers for each field in the datafile. The first is the class, 0
through 3. 0=date, 1=string, 2=numeric, 3=numeric dollar format The second
is the length of the field on disk.
The third number details if and how the field is indexed if the field holds
string data, the number of decimals (0-8) to record if the field is numeric,
and the format of the date (1=MM/DD/YY 2=DD/MM/YY) of date fields. If you
specify 9 as the number of decimals the programs do not round data going into
the field.
The fourth number is the absolute field number, a unique identifier.
The file CTRLFILE.RAD holds the record numbers, 1 - 32767, that you choose to
identify the records. The file extension .SAD connotes a sequentially accessed
disk file, while the file extension .RAD connotes a random access diskfile.
When the programs start, these files are read, error checked, and the datafile
file is opened according to the instructions they hold. The programs will not
operate without these files.
FIELD: Within records are fields. As a record is a subset of a datafile, and
describes a unit of the datafile, so a field is a subset of a record, and
describes the same attribute of the record as do the fields in other records.
For example, we might have a field in our datafile called price. And a field
called cost. So, in each record, representing each item we sell, we have a
field holding the items' cost, and our price. The cost is in field number two
and the price is in field number three. Making an operation such as raising
all our prices ten percent take ten seconds instead of hours of shuffling paper
records. A FIELD is also called a DATA SEGMENT.
FILE INDEX: The purpose of a file index is to identify a record in the file by
its' contents, rather than its' record number. If a file index is not
available for a field each record will have to be read from disk and
checked for that value. The sort routines in this package do that, but, when
processing files with many records it takes time.
The file index fills the need for speed by producing a numeric value for each
indexed field of each record, and placing it in the computers' memory. That
takes a lot of memory; in fact, 80,000 bytes of RAM are assigned this task when
8,000 records are loaded by the program. When the user enters a search value,
the contents of an index in a particular record, the program assigns a numeric
value to it, and compares it to the values stored in RAM for that index,
thereby bypassing the need to read the records from the disk and compare their
contents to the search value, as in a sort.
Unlike a sort, the full value contained in the record must be entered as the
search value. James Brown, JAMES BROWN, and James Brown (2 spaces) are all
the same values. The indexes can not be searched for Brown. To do that, use
select records alpha.
FLAG: A coded message occupying a string field designed to hold it. A flag
is a message left in the record, and can have any meaning you assign. Used to
reflect certain conditions in the record, and to sort for the records
containing the flag.
INSTRING SEARCH: The SELECT RECORDS ALPHA routine offers two modes of
matching: Strict equality and an instring search. If you opt for strict
equality and enter FRED as your search string only those records containing the
word fred (and nothing else) will be placed into the group. If you opt for
an instring search all records containing the word fred, along with any other
data that happens to be there, will get into the group.
MACRO: Not a single process, but any series of multi-record operations,
recorded to disk while they were being done by the program. Once recorded, a
macro can be "replayed" and may well produce different results, if the data in
the datafile has changed.
MARKER: A diskfile that records the record numbers and number of current
survivors, along with their counters, if any. Sorting place markers are
useful to eliminate some records, then take some action on the remainder. They
provide the ability to re-load the previous survivor group, with counters, from
disk, and continue processing with the previous group.
I/O GROUP: As the survivor group is a group of records stored in memory,
the I/O group is a group of fields stored in memory. The declaration of an
I/O group tells the program which of the fields to display on the
screen, accept from the keyboard, or print on the printer.
Using an I/O group saves you the time taken to search out relevant information
from a listing of the whole record.
MS-DOS LEGAL PATHNAME: The programs ask the user to enter a MS-DOS legal
pathname for marker and relational group diskfiles written and read. Anyone
who uses this program without a thorough, hands-on understanding of the MS-DOS
disk operating system, and its "tree" directory structure is inviting disaster.
To familiarize yourself, if you have not already, with the MS-DOS disk
operating system, review the manual that came with your computer, or acquire a
readily-available privately authored textbook. MS-DOS is by far the easiest
computer operating system ever designed.
NON-UNIQUE INDEX: When a field is indexed as non-unique, the computer
will allow duplicate entries. When searching a non-unique index multiple
matches may, therefore, be found. The user views the record on the screen,
then decides to accept the record or to continue the search.
NUMERIC: A numeric field can hold only numbers, and the decimal point. It
can be used in all number-oriented operations, as well as to print or view.
RECORD: A record in a datafile describes a single item, that is in some way
similar to the rest of the items in the datafile. For example, we might find
both sacked manure and ten carat diamond pendants in the same datafile. The
similarity between these two items is that both are sold by the same general
store.
RECORD ENTRY: The act of typing in records from the keyboard to the datafile,
whether new or established. All fields entered can be re-checked and
corrected before data is written to disk.
SELECT RECORDS: When records are selected a data in the record is compared to
a comparitor. The records that compare positively (true) are placed in the
survivor group, and those who compare negatively (false) are not. This process
is known as an EXCLUSIVE SORT, or just sort.
SELECT RECORDS ALPHA: A sort that uses string, or alphanumeric, fields, and
compares strings to strings.
SELECT RECORDS NUMERIC: A sort that uses numeric fields, and compares
numbers to other numbers. Since dates are essentially numeric data, when
stripped of their delimiters, they are selected as numeric data. To get a
group of records on/after XX/XX/XXXX and on/before XX/XX/XXXX use select
records by numeric comparison.
STRING: A string field can contain both letters and numbers. If it contains
numbers, they are available for printing or viewing only, and can not be
totaled, averaged, or used in the manner of a numeric field.
SURVIVOR GROUP: This package provides a real, rather that figurative survivor
group. After a sorting operation excludes some records from the group the
screen displays only the records now in the group, ignoring records that have
not "passed" the sorting "tests" specified by the user.
UNIQUE INDEX: When a field is declared as unique all records must hold
a different value in that field. The advantage of this is that only one
match for a search value will be found. The dis-advantage occurs during record
entry-updating, when the computer refuses to accept a new record because of a
duplicate found in another record.
UPDATE: The act of changing the information stored in the datafile.
WRAP-UP:
In case you haven't had enough, the instructions for the other programs await
you in their own files.
Allow me to thank you for trying THE DATAMAGE, and to apologize for these
instructions, which certainly leave something to be desired. I believe that
something is the skill of someone who specializes in communicating with people
via the written word. Don't look at me, I am only just learning to communicate
with a computer, via keyboard. IF a few people register I will pay somebody to
come up with a proper manual.
Version 4.0, released 9-15-1991
TO THE PROFESSIONAL:
You may not utilize the DATAMAGE package as a part of your systems produced for
a fee without contacting me and presenting your credentials. I do not want the
name DATAMAGE sullied by a bunch of amateurs. Your failure to do this will be
considered COPYRIGHT VIOLATION, and appropriate action will be taken. The
standard judgment for COPYRIGHT VIOLATION is $25,000.00.
Any and all systems generated for a second party are subject to a surcharge of
10% calculated on the gross sale. I have left you lots of fat. DATAMAGE is
between 50 and 95% of any business system you may desire to create.
In the MAGE\DOCS directory you will find code, in BASIC and C, to load and
access a DATAMAGE file. OK, so you want to write a random-file program.
First thing you run into is that there is no file for the program to process.
Why not enter a few records with DATAMAGE? And, later on, when you're writing
to the file(s) in your system, and you wonder whether what you wrote was
correct why not just load the file with DATAMAGE?
Certainly, the general-purpose datafile manipulation capabilities found within
DATAMAGE will be of great use to your end user, and provide the overall system
you deliver with power that would have cost the customer a BUNDLE had it been
necessary to hard code it into his program.
And, finally, there's the overhead. If your user is obliged to buy dBase,
Lotus (etc.) to run your system the overhead is high. But a copy of DATAMAGE,
at $80 US, is hardly noticed.