DFMatrix ver. 1.1 for DataFlex 3.1x

Copyright statement

The DFMatrix program and the source code in this upload were programmed by me and are to be considered 'public domain' and may be distributed freely as is or as part of a product including these files with no further permission than this statement. On the other hand, if you lose data or suffer other difficulties from using this upload I will not be held responsible for your losses.

Sture Andersen, Copenhagen (Budapest, actually), September 25th 1999

DFMatrix is a DataFlex character mode program that is able to analyze a database structure. The basic idea of DFMatrix is that it is able to take a snap shot of a database definition (without the actual data) and save it to a file (with extension FDX). Such a definition may be loaded at a different site whereby the complete structure will be available for comparing or analyzing.

In the current upload you will find version 1.1 of DFMatrix. In there you find a dfmatrix.flx file that may be used with the DF 3.1d DOS/CM runtime. If you need to run DFMatrix on another platform (Linux or UNIX) or with 3.1 revisions b or c versions, you may download the source code and compile it yourself. Note that the source code must be compiled on the target platform. Do not attempt to port the FLX file from one platform or DF version to another. The FDX files generated by DFMatrix itself are compatible across all DataFlex platforms. You may safely load FDX file generated with a UNIX version of DFMatrix into a DOS version of DFMatrix.

When working with DFMatrix you should keep in mind that one faulty keystroke might wipe out your entire database. This will become even more true in future versions but I hope that I have hereby scared you enough to make sure that you always observe appropriate backup procedures.

The program has a few strange behaviors:

I set out to do this program in order to be able to perform database restructure operations based on comparisons between two different sets of datafiles. While the program will eventually be able to do so, it is not yet capable. But in the meantime I have found it to be extremely useful in the following situations:

If you download the source code you should take care to place it in a directory by itself. Do not mix it with other source codes (especially not with VDFQuery). And do not change the default language in language.pkg. It should be English. It is not my intention to translate DFMatrix into local languages.

Note: If you make changes or enhancements to the source code, please indicate so by changing the name of the title bar. This is done by changing the value of the app.dfMatrix.Title symbol defined in the very beginning of the dfmatrix.pkg package file. The value of the symbol app.dfMatrix.Title is at the time of download "The DataFlex Matrix". Change it to something else.

And by the way, it runs considerably faster with DFRUNCON.EXE than with DFRUN.EXE in Windows 9x/NT environments.

 

 

 

These are the menu items:

'File' pull down:

Open current filelist

Reads in the database definition that the program currently sees (through filelist.cfg and via DFPATH).

Open file..."

Reads in a database definition that was previously saved to a FDX file (using the 'Save as...' option below).

Save as...

Saves the definition currently opened (by the 'Open current filelist' option above).

Printer setup...

Allows you to specify which port or file a report should be sent to when printing to printer. Default is 'LPT1:'. Also lets you specify the number of lines per page.

All reports are sent to the built in previewer and may optionally sent to printer (that is: the port specified in this option) from there.

'Functions' pull down:

Compare data definitions

This function lets you compare two sets of data base definitions. The dialog has a left side and a right side both capable of reading a data base definition (either 'current' or from a file).

The left side is termed 'old definition' and the right side is termed 'new definition'. The reason for this is that the result of a compare operation of the two will come out as a set of instructions that transforms the left definition into to the right.

'Import/Export' sub menu:

Export to file Dumps a data file to a sequential file (with extension ASC). Readable by the 'import from file' option below.

Erase data Deletes all data in the selected files!

Import from file Reads in data from a sequential file (generated by 'Export to file'). This option will not perform any check to see if the records already exists. If you read the same file twice, you will get a lot of 'Duplicate records not allowed' errors. Note also that the records will not maintain the same record numbers as they had when the ASC file was generated.

'Reports' pull down:

List filelist.cfg

This report lists the working directory, filelist.cfg location, the values of PATH and DFPATH environment variables and the contents of filelist.cfg together with the full path to all data files that can be found.

Check definitions

Each file is checked for the following conditions:

Check orphans

Looks for orphan records. Orphan records are records that relates to non existing parent records. Note that like any other process in DFMatrix, this one cannot be interrupted once it is initiated. If you have got large data files, this is the time to get coffee.

Relation trees

Draws the relation tree for each of the selected files in either:

directions.

Table definitions

Prints file definitions for people not familiar with DataFlex terminology.

Year 2000

Find date fields: Lists date fields.

Check for 2-digit year records: Look for records with un-converted dated (dates with only 2 digits in the year).

Update 2-digit year records: Look for records with un-converted dated AND convert them.

All kinds of values

This report lists a lot of values not specific to data files.

 

 

In working with this tool you will generate files with the following extensions:

*.FDX File Definition (eXtended)

These are files that are generated when you save a DBMS definition. The files contains all information (except data) about the structure of your data files. Only one file is generated containing the data definitions for all files that can be seen through the current filelist.cfg.

*.FSL Filelist SeLection

When working with the system you may find that you need to select the same set of files again and again. In order to ease the pain of doing that it is possible to save a given selection to a FSL file. On a another occasion when you need to select the same set of files, you simply load the FSL file back into the file selector.

*.ASC

When you use DFMatrix to write data to sequential files data is written to a file with a name corresponding to the root name of the file and with the ASC extension.