Firestorm – Usage GuideThis usage guide documents the way in which Firestorm has been used over the last four years. Many of the instructions are based on conventions and are open to change as more experience is gained, and better ways are found to do things. Please don't hesitate to suggest improvements. There are three directory structures that you will need to set up.
There are three kinds of work that you will need to do in order to create a web application based on your DataPerfect database. Using METAD, which is itself a DataPerfect database (somewhat like the STE Manager, though not nearly as complete), you will create the PBA.C file that describes your database. This file contains a small part of the information from your DataPerfect structure file, in a format suitable for the programmatic interface. We suggest that you place the METAD database, and the accompanying METADXP.COM program in a directory named "metad". The METAD database will produce its output in a subdirectory whose name is (by default) the first five characters of your database name. The second kind of work you will do is to compile the ANSI C source code for the Firestorm database engine. We suggest that you do this work in a directory named "fs". Again, the CGI scripts that you will write for a particular one of your databases will be placed in a subdirectory whose name is the first five characters of your database name (or a five character abbreviation of your choice). Once you have created and compiled the PBA.C file, and have compiled the Firestorm source code, and have compiled and linked these with your own CGI scripts, you will need to copy the executable files into a directory that can be used by your web server. So, the third kind of work you have to do is to set up a web server, and configure it to run CGI scripts. All of the database files (except the .STR file) will also need to be copied (or reside permanently) in the directory from which the CGI scripts are to be run. 1. METAD and generation of PBA.C filesUnzip md001126.zip in a directory named METAD. Create the METAD database using DPIMP.COM. If you followed the instructions in the installation guide you will have already performed these steps. For each database you wish to use on the Internet, you will need to follow the same steps. These are given below (using METAD itself as an example).
Repeat steps 1-16 for each database you want to use with Firestorm, replacing "metad" and "METAD" with your five character abbreviation in steps 1, 2, 3, 4, 10, and 16. Step 11 will need to be changed to give each database its own number, one for the first, two for the second, and so forth. If you get to database number 22, you will need to have that one be number 23, as METADXP.COM always produces number 22, and you need to leave that number free for the import. Whenever you change one of your databases, by adding or removing fields or indexes, you will need to repeat steps 3-16 to generate a new PBA.C file that describes it correctly. You may delete its record in the Database Description panel and reuse the same number, or give the new version a new number, as you wish. The directory structure for this first kind of work will look something like the following diagram. This assumes that you have followed steps 1-16 for the metad.str database itself, for one of your databases named "phone.str", and for one of your databases named "contacts.str" for which you have chosen the abbreviation "cntct". | +-metad | | | +-metad.str (etc.) | +-METADXP.COM | +-metad | | | | | +-metad.str | | +-METAD.{X} | | +-PBA.C | +-phone | | | | | +-phone.str | | +-PHONE.{X} | | +-PBA.C | +-cntct | | | +-contacts.str | +-CONTACTS.{X} | +-PBA.C | 2. Firestorm and CGI scriptsIf you have followed the installation guide you will have set up a directory named "fs", unzipped one of the Firestorm source code archives, and compiled the code. This directory should contain the files from the following list. If you are compiling on a Windows machine, the object files will have a ".OBJ" extension, rather than the ".o" extension used in UNIX-like systems. The various files are given in order from the lowest, most central, or foundational layer first.
All of the programs described above, together with their .o (or .OBJ) compiled versions, will reside in the fs directory. Make a subdirectory of fs, named with your five character abbreviation, for each of your databases. Copy into each of these the corresponding PBA.C program, which was generated by the METAD report. Compile this program to produce PBA.O (or PBA.OBJ). With all of this done, you are ready to begin making executable programs for your database. To make a command line program for your database, link together pba.o ../dp.o ../map.o ../dpif.o ../engine.o and ../dot.o to form the executable program named fs-xxxxx, where "xxxxx" is replaced with your five character abbreviation. The command to do this on UNIX-like machines is: gcc -o fs-xxxxx pba.o ../dp.o ../map.o ../dpif.o ../engine.o ../dot.o We recommend that you create a subdirectory (of the database-specific directory) named "Data". Copy into this directory all of the panel data files, the index file, and the .TXX file for your database. One important note here is that the index base blocks must be assigned the same way in the PBA.C file and your database. The simplest way to ensure this is to delete the .IND index file, run DataPerfect (answering "1 - Create a New Index File with New Indexes for All Data Files." when prompted) on your database. Then, go into one of its panels (doesn't matter which one), and answer "3 - Re-create the Indexes for All Files." when prompted. This will create a new index file with all of the index blocks allocated in the same way the PBA.C assumes. Now change into the Data subdirectory and try out the command line interface for your database. Now, working in the database-specific subdirectory of fs, you can begin to create your CGI scripts. Let's say, for example, that you are working with a contacts database, for which you have chosen the abbreviation "cntct" and that you are working on a CGI script named "cntct-enter.c" to accept the data from an HTML form and add a new contact to the database. Your directory structure will look something like this: | +-fs | | | +-dot.c, dot.o, engine.c, etc. | +-cntct | | | | | +-pba.c, pba.o | | +-fs-cntct | | +-Data | | | | | | | +-contacts.txx | | | +-contacts.ind | | | +-contacts.dat, etc. | | | | | +-cntct-enter.c | | +-cntct-enter.o | | +-cntct-enter.cgi | | | +-phone | | | +-pba.c, pba.o | +-fs-phone | +-Data | | | +-phone.txx, phone.ind, etc. The command to compile cntct-enter.c and create cntct-enter.o is, on UNIX-like systems: gcc -c cntct-enter.c The command to create the executable file, cntct-enter.cgi, is: gcc -o cntct-enter.cgi cntct-enter.o pba.o \ ../fsMain.o ../fsCore.o ../dpif.o ../engine.o ../dot.o Once the executable CGI script has been created, you can test it from the command line. For example, assuming a very simple contact structure, consisting of Name, Title, and Phone, you might test it like this: cd Data ../cntct-enter.cgi Name=Bob "Title=Mangaging Director" Phone=555-4073 To add the same record using the command line interface would be done this way: cd Data ../fs-cntct p1 a Bob "Managing Director" 555-4073 q At this point, you are now able to create Firestorm programs to access your database on a UNIX-like system. You have a command line interface and the ability to write an unlimited number of custom access programs and executable CGI scripts. The next step is to get these CGI scripts running in conjuction with your web server, so that you have Internet (or intranet) access to your database. 3. Web server HTML documents and CGI executablesThis section is planned but not yet written. Please check back later. Thank you for your interest and patience.Contacting sanbachs.NETSign or browse our guest book. webmaster@sanbachs.comA. Lewis Bastian, Jr. Bruce Conrad Thom Boyer Disclaimer*DataPerfect® is a copyright of Novell, Inc. sanbachs.NET is not affiliated with Novell, Inc.visitors since November 23, 2000. |