DBF to MUIbase
==============
PURPOSE
MUIbase, a powerful relational programmable database that uses MUI
as user interface, only has a simple import feature. Import and
export is done by reading and writing ASCII files. Therefore the
data you want to import must be in a special format described in
the MUIbase documentation. This format is very simple, but it
needs a lot of time to convert a database file format to this one.
Since dBASE provides the most used database format on all
platforms, I wrote a small utility to convert these files into
MUIbase import files. The dBASE file (short: DBF) uses a simple
format, but has some restrictions.
This program is not only for use with MUIbase. Every program, that
handles ASCII database files with field and record delimiters, can
progress files generated by DBFtoMUIbase.
DBFtoMUIbase is Emailware. If you like it, send me a email
(address see end of ReadMe).
INSTALL
Simply unpack the archive to anywhere you want.
REQUIREMENTS
- MUIbase >= 1.0 (http://www.muibase.de/)
USAGE
DBFtoMUIbase is made for Shell usage. Following string shows the
template:
MUIBASEFILE=MBF/A/K,DBFFILE=DBF/A/K,NOQUOTES/S,
RECORDDELIMITER=RD/K,FIELDDELIMITER=FD/K,FIELDS/S,
LIMIT/K/N
MUIBASEFILE=MBF/A/K
This option specifies the name of the MUIbase import file to be
generated. This file will be overwritten without request.
DBFFILE=DBF/A/K
The option DBF specifies the name of the DBF file to be
converted. Currently the converter only handles DBF files of
version 3 and files without an additional DBT file.
NOQUOTES/S
By default DBFtoMUIbase always surrounds the field names and
field data by double quotes. When using this option you can
supress quoting. If you do so, you have to switch off the
option 'double quotes' in the import requester.
RECORDDELIMITER=RD/K
By default the converter uses the 'new line' character for
delimiting the records. The option RD allowes you to set other
record delimiters. The delimiter is a simple character or a
C-style escape character like 'n' or 't' (x?? and o??? are
not allowed). You also have to use the same character in the
import requester.
FIELDDELIMITER=FD/K
By default the converter uses the comma character for delimiting
the fields in each record. The option FD allowes you to set
other field delimiters. The delimiter is a simple character or
a C-style escape character like 'n' or 't' (x?? and o???
are not allowed). You also have to use the same character in
the import requester.
FIELDS/S
In MUIbase you only can import data when you provide a field
names line which *MUST* contain exactly the field names as used
in MUIbase. This option prints the field names with type and
size from the DBF file, but does no conversion. Using these
informations you have to build a table in MUIbase which contain
the printed same names (case sensitive!), types and sizes. The
order of the fields is important too.
LIMIT/K/N
For testing purposes you can limit the records writing to MBF
file. If you specify a number which is less than the number of
records in the DBF file, the converter only writes as much
records as specified here. It will always use the first records
in file. A value of 0 is also possible; this only generates a
line of field names using the field and record delimiters.
NOTES
Concerning MUIbase, DBF files have some restrictions as follows:
- Field names are limited to 10 characters.
- Duplicated field names are not explicitly excluded. This problem
can be corrected by manually editing the concerning field names.
- Memo fields are stored in a separate file with extension DBT
(additionally to the DBF one). The converter does not handle
these files and sets such fields to NIL. Try to change the memo
field in the application writing the DBF file to a character
field.
- Texts containing double quotes will not be handled correctly.
MUIbase then will terminate the import. To solve this problem,
you manually have to correct such strings, so that the double
quotes are really the beginning and end of a string.
EXAMPLES
Following converts a video database file 'video.dbf' to a MUIbase
import file 'video.import':
DBFtoMUIbase DBF=video.dbf MBF=video.import
Same files, but without quotes:
DBFtoMUIbase DBF=video.dbf MBF=video.import NOQUOTES
Same files, but using tabulators instead of commas:
DBFtoMUIbase DBF=video.dbf MBF=video.import FD=t
Next one shows the format of the DBF fields:
DBFtoMUIbase DBF=video.dbf MBF=video.import FIELDS
(unfortunately you also have to provide the option MBF; it only
generates a empty file)
Generates only a line of field names in 'video.import':
DBFtoMUIbase DBF=video.dbf MBF=video.import LIMIT=0
DISCLAIMER
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
MISC
This program is written in 4 hours, so suggestions and bug reports
always are welcome, but I believe that the purpose of this program
is fully accomplished. The conversion from MUIbase export files to
DBF files is difficult, because MUIbase doesn't provide field
formats ;-(
Of course, watch the official MUIbase homepage at
http://www.muibase.de/
MUIbase is © 1998-2020 Steffen Gutmann
BTW: Register MUIbase! RESISTANCE IS FUTILE!
CONTACT
Ralph Reuchlein <aminet@rripley.de>
[updated 30-May-2020 because neither address nor email was valid]
|