 3BASE Help Contents

Note: To learn how to use Help, press F1 now.

3BASE converts databases between many different formats. A database is a collection of records (e.g. addresses). Each record consists of a certain number of fields (e.g. name, address, telephone number).

To convert a database, you would generally take the following steps:

1. Press the OPEN button and select a database to convert. 3BASE provides a database viewer which allows you to look at and browse through the selected database.

2. Press the CONVERT button and select the type of database you wish to create

3. Press OK to convert the database automatically, or press CUSTOMIZE to use the advanced conversion options.

Other subjects that may be of interest:

File types recognized by 3BASE

Defining and re-using conversions


Selecting a file to convert
 Selecting a Database to Convert

Press the OPEN button to select a database to convert. 3BASE will analyze the selected file and display some information about it, e.g.

This example shows that 3BASE has recognized the file C:\DBF\ADRES.DBF as a Series 3 database of 122 records, the largest record being 8 fields. The database viewer currently shows the 21st record.

Note: If 3BASE does not recognize the contents of the selected file, it will assume that it is an ASCII file (a file of arbitrary format). In that case, 3BASE will require your help in determining how many fields there are per record, and how fields and records are separated.

If you do not know what to fill in, just enter reasonable guesses, then use the database viewer to determine more appropriate values.


 Selecting a Conversion

After you have selected a file to convert, press the CONVERT button. You will get the following dialog on your screen:

Select one of the file types, then press either OK or CUSTOMIZE.

If you press OK, 3BASE will perform a fully automatic conversion. Records and fields are converted in such a way that the results resemble the originals as closely as possible. Fields are made just large enough to fit the largest original piece of information.

The customize option allows you to specify exactly how records should be converted. You may leave out certain fields, for instance, or change their length. 3BASE can even 'learn" new customizations, using some existing database as an example.


 Customizing a Conversion

Customizing a conversion means specifying exactly what the target records should look like. The options that 3BASE offers will depend on the type of conversion you customize.

The customization screen offers a table in which you can specify the type of target fields you need, their (maximum) size, their name, and from which source field they should be copied. To change something, just click on it and select or enter an alternative.

Source Name: specifies which source field is used to provide data. Since fields do not always have a name, the left-most (grey) column shows the source field number.

3BASE initially maps the first source field to the first target field, the second source field to the second target field, and so on. Note that you can also use the DELETE and ADD buttons to delete and add target fields, respectively.

Source Type (for information only): shows the type and size of the source field (the size shown is the size of the largest field found).

Target Type: specifies the type of each target field. The types that are available depend on what you are customizing. Some formats (such as the Windows Cardfile format) allow 'string' fields only.

Target Length: specifies the (maximum) length of each target field. The lengths allowed depend on the target type.

Target Name: (available for certain conversions) specifies the field name (or 'label') of each target field.

See also:

Separators

The LEARN button (learning by example)

The DEFINE button (re-using your customizations)


Seperators
 ASCII databases and Separators

ASCII files are files that contain data in the form of 'ordinary text'. Although there are no fixed rules, the data can usually be interpreted if you know which separators are used. There should be a field separator between every two fields, and a record separator between every two records.

3BASE allows you to specify these separators when reading or writing ASCII files. Since some characters are difficult to input, several special symbols are provided. These are:

{COMMA}	The comma

{CR}	The carriage return (ASCII code 13)

{LF}	The linefeed (ASCII code 10)

{PAGE}	The DOS page-separator (ASCII code 12)

{EOF}	The DOS end-of-file character (ASCII code 26)

{TAB}	The TAB character (ASCII code 9)

Furthermore, you can put any ASCII code between braces. For instance, instead of {TAB}, you could use {9} (since the TAB character has ASCII code 9).

TEXT files are probably the best known examples of ASCII files. In TEXT files, fields and records are separated by a 'newline' (technically: CR/LF, the carriage-return/linefeed combination). A small telephone database (5 records, 2 fields per record) might look like this in TEXT format:

Peter Yellow

020-18276333

Peter Powels

020-23121980

Rene Shore

01627-13298812

Wilco Hish

020-543298761

Sammy Worth

020-54329876

CSV files (Comma-separated Values) are ASCII files. Fields are separated by commas, records are separated by CR/LF (i.e. each record is on a separate line). Strings are usually put between double quotes. A telephone database in CSV format might thus look like this:

"Peter Yellow","020-18276333"

"Peter Powels","020-23121980"

"Rene Shore","01627-13298812"

"Wilco Hish","020-543298761"

"Sammy Worth","020-54329876"

SDF files (also called fixed-length files or 'tables') are rather special. Each line represents a record (i.e. records are separated by CR/LF). However, there is no field separator. Instead, the length of a field is exactly the same on every line (spaces are appended to make fields the same length). 3BASE can create SDF files, but since there is no field separator, 3BASE can not read SDF files. A telephone database in SDF format might look like this:

Peter Yellow	020-18276333

Peter Powels	020-23121980

Rene Shore	01627-13298812

Wilco Hish	020-543298761

Sammy Worth	020-54329876


 File types and database formats

Series 3 database format: a special type of Psion ODB format (see below). Files in this format can be used by the Psion Series 3 and Series 3a database application.

Psion ODB format: a very general database format, used by many applications running on Psion computers. All Psion development environments offer programming constructs for accessing and manipulating Psion ODB databases.

Windows Cardfile format: files in this format can be used by the Windows Cardfile application.

HP 95LX Phone Book format: files in this format can be used by the HP 95LX Phone Book application.

ASCII, TEXT, CSV, SDF format: variations of the General ASCII format, used for storing data in the form of 'ordinary text'.

dBASE III, dBASE IV and FoxPro formats: the three main variations of what is probably the most widely used database format in the world. Many applications maintain their databases in one of these formats, or allow data to be exchanged in one of these formats. Many utilities exist to view and manipulate such databases. A large range of programming languages and development environments offer constructs to access and manipulate data stored in these formats.

See also:

Customizing database formats

Learning new formats by example


 User-defined Conversions

Every customization window offers a DEFINE button. This button allows you to save your customization to disk.

Later on, you can re-use such stored customizations by selecting the 'User-defined conversion' (see selecting a conversion).


The 'LEARN' button
 The LEARN button

3BASE can 'learn by example'. Suppose you wish to convert a file to exactly the same format as, say, a dBASE III file called 'ADDRESS.DBF':

press the CONVERT button

select the 'dBASE III' conversion

press the CUSTOMIZE button

press the LEARN button

select the file 'ADDRESS.DBF'

3BASE will now create a customization that matches the format of ADDRESS.DBF exactly. The only thing that remains to be done is to check whether the source fields are in the correct order.

Note that such customizations can be saved to disk using the DEFINE button, and re-used as often as you like.

The LEARN button is only available in the customization screens for dBASE III, dBASE IV, FoxPro, Psion DBF, and Series 3 database files.