PDoxFLib - The Paradox Forum File Library Catalog Manager

	by Mark E. Stingley
	   Aegis Data Systems
	   2334 Gross Road
	   Dallas, Texas 75228
	   214.324.5329

	   CompuServe 73740,236


This system will benefit anyone who wants to learn more about using OPAL to translate text files or anyone who wants to make it easier to keep track of the resources here in this forum.

I was tired of trying to keep track of PDoxWin forum library files
through printouts of the library catalogs, so I put together the
PDoxFLib database to store forum library catalog records.  Then I
wrote a script to read them from the source text file.  The script
Read_Cat will read the "Long" format library catalog text files and
store the data in PDoxFLib records.

After unzipping the PDOXFLIB files into their own subdirectory, the
only change needed to process your first library catalog is to put the
catalog name in line 101 of Read_Cat.SSL; i.e. pxw04.cat, pxw11.cat,
etc.  Also, the catalog file should be in the same subdirectory with
the other files.

The script should then be run to process the desired catalog file.


ObjectPAL Functions Used:

	open()		attach()	TCursor
	size()		readLine()	eof()
	match()		switch		search()
	substr()	rtrim()		ltrim()
	position()	insertRecord()	sleep()
	close()		endEdit()	msgStop()


Techniques of interest:

	Reading and parsing a text file.
	Inserting new records into a table.
	Replacing all instances of a specified character in a string.
	Showing progress via a form status bar.


Files included:

	PDoxFLib.DB	- Catalog database
	PDoxFLib.MB	- Catalog memo base
	PDoxFLib.PX	- Catalog index
	PDoxFLib.FSL	- Catalog custom form

	PT_Trans.FSL	- Translation progress display form
	Read_Cat.SSL	- Forum catalog import script
	PFreadme.TXT	- This file


Known bugs and problems:

	match() for the revised upload date "(..-..-..)" does not
	work.  Since this was essentially a recreational project,
	I just haven't spent any time on the problem.

	Serious line format problems will crash the script.  So far,
	this has happened only once to me, where an errant "a" was
	after a file upload date -- "31-Oct-92 a".


Suggestions for improvement:

	Error checking can be improved, but I wouldn't go overboard
	on text format tests.  Data should be hand corrected rather
	than let a script discard information.

	Implement "search before add" to update existing files,
	rather than have dupes cause a key violation and be
	cancelled, or have the project load the "keyviol" table
	afterwards for evaluation of duplicates.

	Add a picklist for one or more catalog files, rather than
	hard coding the file name into the script.  CAT files should
	be renamed as they're processed.

	Add fields to PDoxFLib.FSL for personal comments.

	Add a table for storing typical file paths where files are
	downloaded to or kept, so that the "Downloaded? Y/N" field
	can be updated automatically.

	Granted, Read_Cat is not sophisticated by any means.  But,
	it does work and provides are few techniques not found in
	the PDoxWin documentation.  It could be streamlined by
	combining common code into procedures or libraries.  For
	this example though, the script was one long routine to
	make the file translation flow easier to follow.


Licensing:

	You are free to use the included files for personal education
	and experience.  Naturally, some of the provided examples are
	expected to find their way into development for resale, which
	is fine.  However, the provided materials may not be copied
	"as is" or repackaged for resale, except for minimal copying
	charges by user groups to cover cost of materials.

	Since I retain all rights to my work, I would like to maintain
	this system through any improvements.  If you make changes
	or improvements, please Email them to me.  I will incorporate
	suitable changes and give proper credit to the author, then
	upload the revised system to CompuServe.


Acknowledgements:

	Thanks to Lance Leonard (76117,3050) for his fine examples in
	PCT_DEMO.  His "progress bar" display concepts were used for
	the file translation status display on PT_Trans.FSL.  His
	complete examples can be found on CIS in PCTBAR.ZIP.