About IONET 6.14 IONET is a code generator (Oh no! Not another one) which can save you a bunch of time in the initial stages of application development. Actually, IONET will produce a working application without writing a line of code. Typically you will want to add custom reports and your own touches to the final product; IONET gets you to that point faster. After you design a data screen (GEN file) with your text editor, IONET will crank out over 4,400 lines of Clipper Summer '87 code plus link and make files to produce an application which will allow you to add data, search/edit data, create/recreate your indexes, pack, set function keys, select printer drivers plus laser utilities, a basic help system, user selectable colors, network file and record locking functions, ad hoc report writer, query by example/complex filter builder and much more. Let's see how this thing works. Screen Layout * test.gen Last Name ^lname First Name ^fname Address ^address City ^city State ^st Zip ^zip Home Phone ^hmphone Business Phone ^busphone In the example above we have a file named TEST.GEN. A (^) caret is used in the "GEN" file to distinguish the field names from the @ SAYs. Field names must be kept to 9 characters or less. MemVars used for the field GETs are a concatenation of "M" plus the field name. The MemVar for the field "ADDRESS" will be "MADDRESS". Anything not preceded by a (^) caret will be treated as an @ SAY in the generated application. IF "Last Name" is on the first line in TEST.GEN, then it will be placed on line 1 in the generated screens. Line 0 is reserved by IONET to show the record number and the current master index key. Lines 22 thru 24 are reserved for system commands such as search, edit, skip etc. Line 21 is normally reserved for a public filter condition that is set in the QUERY program. Tutorial Copy IONET.EXE and IONET.OVL into an empty directory. IONET creates two temp files at start up, IO.DBF and IOGEN.DBF which it uses for a template. IO.DBF will contain database structure, field sequence/ordering and screen field coordinates. IOGEN.DBF will contain the screen @ SAY coordinates. 1) Type "IONET" (without the quotes) and you get a scrollable list of "GEN" files (files with a .GEN extension) from which to choose. Select "TEST". 2) Enter the path that leads to your Clipper libraries. This will be inserted into a MAKE file (more on the MAKE file later) that IONET will produce. It has NO impact on any other generated code. 3) TEST.GEN will appear on the upper part of the screen and you will be asked for your field definitions. Let's say you want "lname" to be a character field so you type in "C". Next, you will be prompted for the field length. The maximum allowable length will be defaulted or can type in a smaller number. You may override the default with a larger number but the generated code will probably need to be manually adjusted. Continue until all fields have been defined. 4) Want to create any indexes? Answer YES and up to 15 indexes may be specified using any legal Clipper syntax. The default for the first index key is the name of the first field. You may accept this or type in something else. Continue until all index keys have been entered. 5) Almost done now. Prompt for Highlight or NoHighlight on the field SAYs. If you select NoHighlight, your @ SAYs and GETs will be the same color. Select Highlight, it will look better. 6) Want to change anything? If YES, IONET will loop around so you can make changes otherwise the code will now be generated. 7) After the code is generated, type "REDO" to compile and link your code. If you get an error after typing "REDO" chances are that MAKE.EXE does not exist, is not in the path or is an incompatible version. In that case try this: TYPE CL TEST If you do not have a CL.BAT file, you can use the following example. C:\Clipper\Clipper %1 IF NOT ERRORLEVEL 1 tlink %1 ,,NUL,c:\clipper\clipper c:\clipper\extend Files Produced TEST.PRG - main menu TESTADD.PRG - add data TESTGET.PRG - Search, edit and general file maintenance. TESTDB3.PRG - Format file. Does not get compiled or linked. Useful in applications with multiple screens. TESTHLP.PRG - help system GENERAL - Contains the User Defined Functions and Procedures. IOREPORT.PRG - Ad Hoc Report Writer IOQBE.PRG - Query by Example REDO.BAT - To compile and link TEST.EXE TEST.LNK - Script file for TLINK. TEST.MAK - make file The Make File The MAKE FILE, TEST.MAK, processes the files with MAKE.EXE (not supplied), then tells Clipper to compile all the necessary files into .OBJ files and instructs TLINK to link them into TEST.EXE. The MAKE.EXE utility looks at the date and time stamp on the .OBJ files if they exist and compares this to the date and time stamps on the .PRG files. If the .PRG file has been updated it will have a later date and based on this, MAKE.EXE will re-compile just that file. In this way, only the updated files get re-compiled after modification. The version of MAKE.EXE which was supplied with S87 which will not work with this MAKE FILE. I'm using Microsoft MAKE.EXE Version 4.05 which works fine. Changes? After a successful compile/link cycle go in and look at the application. Since no data exists you'll want to ADD a record. At this point you may decide that the screen could look nicer if it was rearranged like..... OK. Go back into TEST.GEN and make some changes, then invoke IONET. Select TEST. Since TEST.DBF now exists, instead of being prompted for field definitions you will get 3 choices: 1) USE AS IS Does not alter TEST.DBF but will ask if you want to create indexes and Highlight/ NoHighlight and then generate new code with the updated screen layout. 2) MODIFY/OVERWRITE Will create a new structure even if no changes. THIS WILL OVERWRITE TEST.DBF! Uses the 'old' TEST.DBF for default field definitions. 3) OVERWRITE Like starting from scratch without a database. NOTE: The "USE AS IS" and "MODIFY/OVERWRITE" options require that the field ordering of the existing database matches the GEN file. If not, an error will be produced and you will not be allowed to continue. If your existing database contains anything you wish to save, copy it to another directory, then let IONET create a new database with the "OVERWRITE" option. Later you can append data from the original database. At this point it's time to review the generated application and code. IONET has been in development for several years now. Some of the features such as the Function Key Menu, Laser Utilities, Report Writer and QBE are a result of the feedback we have received from programmers and customers. The code which IONET creates can be used as is to get your new application off the ground quickly. As always, you may delete what you don't need or add additional features as required. IONET and the code it generates are written in pure Clipper and only require Clipper Summer 87, clipper.lib and extend.lib. Code generated by IONET will compile, link and run just fine using Clipper 5.0 and Blinker. A marketing plan for IONET is yet to be established. If you like IoNet please send me a donation ($49.00 suggested) or some work and I'll send you the next update of IoNet. Don Allred P.O BOX 56885 Sherman Oaks, CA 91413 (818) 783-5837 What's New in Ver. 6.14 Ad Hoc Report Writer Query by Example/Complex Filter Builder Automatically generates picture statements Tests for .dbt file Verifies that .dbf field ordering matches gen file Displays gen file without wrapping on the 80th character