Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBF2CH.ZIP
Filename : DBF2CH.DOC

 
Output of file : DBF2CH.DOC contained in archive : DBF2CH.ZIP
/*
*
* File......: DBF2CH.DOC
* Release...: 1.0
* Author....: Steve Kolterman
* CIS ID....: 76320,37
* Date......: November 21, 1993
*
* See the README.1ST file in DBF2CH.ZIP for restrictions on redistribution.
*
*/

For array-based data entry or...for any number of other wacky reasons, you
may find yourself needing Clipper 5.x preprocessor directives for each
field in a specified database/s.

To assist in this task, I wrote a very little DOS command line utility
called DBF2CH.

Syntax:
=======
DBF2CH [<.CH file >] [] []

any valid DOS .DBF file spec, such as "*.dbf".
<.CH file> optional name for the created .CH file. If this param.
contains the "/" character, it will be treated as the
param. described below.
'/' plus an optional string to prepend to field names. The
slash will subsequently be ignored. Useful when handling
identically-named fields from multiple .DBFs. DBF2CH
defaults to append an underscore to .
do not append underscore to .

Examples:
=========
DBF2CH customer
will write the file CUSTOMER.CH from the fields in CUSTOMER.DBF.

DBF2CH customer cust
will write the file CUST.CH from the fields in CUSTOMER.DBF.

DBF2CH \data\customer /cust
will write the file CUSTOMER.CH from the fields in \DATA\CUSTOMER.DBF, and
prepend CUST_ to each field name.

DBF2CH cust*.dbf /cust
will write .CH files for each .DBF matching the spec, give them the same
names as their .DBFs, and prepend CUST_ to each field name.

DBF2CH customer cust /cust
will write the file CUST.CH from the fields in CUSTOMER.DBF, and prepend
CUST_ to each field name.

DBF2CH customer cust /cust /nu
will write the file CUST.CH from the fields in CUSTOMER.DBF, and prepend
CUST (no underscore) to each field name.


DBF2CH writes a Clipper 5.x .CH file containing #defines for each field of
each .DBF that meets the spec. of the parameter you pass. If you pass the
name of a single .DBF, you need not provide the .DBF extension. In other
words, both 'customer' and 'customer.dbf' are valid if 'customer.dbf'
exists in the current directory. If a .DBF has a .DBT associated with it,
the .DBT had better be in the same directory, or else Clipper will let you
know. If you pass a valid DOS .DBF spec., the generated .CH files take the
names of their corresponding .DBFs. If you pass a single file name, you
may specify a different name for the .CH file...as in the example above.

Compile syntax: Link syntaci:
--------------- --------------
CLIPPER DBF2CH /n/w/m RTLINK FI DBF2CH /pll:base50
RTLINK FI DBF2CH /pll:fullbase
RTLINK FI DBF2CH LIB CLIPPER,EXTEND

Almost forgot to mention. Each .CH file includes reports of each field
type, length, and decimals... for handy reference.

Let me know if you end up a user...(of the software, I mean). And, kindly
report any bugs. Bien venido.

- Steve Kolterman

===========================================================================
HISTORY
===========================================================================
Rel. 1.0 November 21, 1993


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : DBF2CH.ZIP
Filename : DBF2CH.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/