Dec 102017
 
Program to create and update database dictionaries for Clipper.
File DICTION.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Program to create and update database dictionaries for Clipper.
File Name File Size Zip Size Zip Type
DICTION.DOC 3138 1363 deflated
DICTION.PRG 18971 4909 deflated

Download File DICTION.ZIP Here

Contents of the DICTION.DOC file


Notes
=====

This is a utility program I wrote to keep track of the various
databases I have roaming around my hard disk, some of which were
created by other people, and therefore have harder to remember
field names that ones I did myself.

It's actually a test to see how well I could write code that
would run under dBase if required, but would take advantage of
Clipper's capabilities if you had it. If DICTION.EXE is not
included in the DICTION.ARC file, and you don't have Clipper,
well, you'll have to settle for plain jane dBase. If the
DICTION.EXE file is there, first try this:

C> DBASE DICTION

and play around with that for awhile, then just...

C> DICTION

and notice the difference. The big thing is speed and the F1 key
bringing up a file menu.


Instructions
============
DICTION reads a dBase database file and produces a DICTIONary
file based on the database structure. The dictionary file is a
data file like any other dBase database, except that it has a
structure like so:

Structure for database : DICTION.DIC
Number of data records : 110
Date of last update : 07/30/87
Field Field name Type Width Dec
1 FIELD_NAME Character 10
2 FIELD_TYPE Character 1
3 FIELD_LEN Numeric 3
4 FIELD_DEC Numeric 3
5 FIELD_DESC Character 45
** Total ** 63

The first four fields are created by dbase by executing a COPY
STRUCTURE EXTENDED, and the fourth field is added by DICTION.

The advantage to this as opposed to other dictionary schemes is
that simply by executing CREATE from .DIC
you can create a database with the structure outlined by the
.DIC file.

To run DICTION under dbase, just type DBASE diction. To prepare
an EXE file under Clipper: CLIPPER DICTION and LINK
DICTION,,,\CLIPPER\DBU, DICTION.

Menu Options
============
0 - Exit (self explantory)

1 - Create a dictionary
Prompts for the name of a database. Do not type the .DBF
extension. A dictionary file will be automatically created.

2 - Modify a dictionary
Prompts for the name of a dictionary. Do not type the .DIC
extension. You may then type the name of the field name you
wish to modify. If it exists, you may delete it or change
it. If it does not exist, you may add a new field.

3 - Print a dictionary (self-explanatory)

4 - Create a database
Prompts for the name of an existing dictionary and a new
database name, then creates the database based on the contents
of the dictionary file.

5 - Modify a database
Prompts for the name of and existing dictionary and an
existing database, then changes the structure of the
database to match that of the dictionary. Automatically
genrates a BAK file.

Note: If you compile the program under Clipper, pressing the F2
function key will tempoarily exit to DOS, and pressing F1 will
bring up a menu of DIC or DBF files, whichever the program is
asking for when you hit F1.


 December 10, 2017  Add comments

Leave a Reply