TwoMake.PRG is used for creating the files which TwoUse.PRG will work with. The program was split into two separate pieces because the job of file creation requires a great deal of code, and won't be used very often.
The entire idea behind TwoMake, and creating a data base file, is laying out a "form." BaseTwo uses the metaphor of a piece of paper in a filing cabinet. On that piece of paper will be borders and margins, as well as blank areas to be filled in. The window with the title "Design Form" corresponds to the piece of paper, and the "fields" which will be created and placed within that window correspond to the blank areas.
When actually using the data base with the program TwoUse, you will be able to pull out one piece of "paper" at a time, make any additions and corrections, and then refile it, or throw it away.
To lay out the form, then, place the mouse pointer inside the window where you would like a field to be, and click the left button. You will be presented with a blank line in which a "field label" can be typed. Upon hitting the Return key, or clicking the mouse elsewhere, the label will be "written down," as it were, and any remaining space between the end of the label and the right edge of the window will be set aside for the data portion of the field.
The field label is intended to be a header for the blank area on the piece of paper. You will not be able to modify it with TwoUse. What you wil be able to modify is the data area following the label.
Inside this data area, once the label is "written down," will be a single number. This is an estimate of how many characters will fit in the data area. The size of the data area, and the position of the entire "field," consisting of label and data linked together, is easily adjusted. Please refer to the "Moving and Sizing Fields" help.
Once a field is created anywhere in the "form window," it can be repositioned anywhere on the form by placing the mouse over the black box at the field's lower left, depressing the left mouse button and, with the button still depressed, moving the mouse to the desired new position, where the button is released.
The data area of a field can be sized by performing exactly the same operation with the black box at the field's lower right. In this case, the upper left corner of the data area is nailed in place; the width and height of the data area change to follow the mouse.
Though a file has been designed, saved, and used for data entry, its design can still be altered as if it were being designed from scratch.
Choose "Redesign" from the File Menu, and select the file to be redesigned. Anything which can be done to a completely new file can be done to the file being redesigned. New fields will be empty. Deleted fields' data will be removed. Any reports or DIF formats which reference a deleted field will themselves be removed.
Once finished redesigning the file, save it. It is suggested the original file be backed up before redesigning it, as a safeguard.
Once the file design is complete, print the file design by selecting the appropriate item under the File Menu and keep the printout for later reference. A "complete" file design is one in which all fields are large enough for any conceivable use to which they will be subjected, placed where they are most wanted, and their data types and computed formulae all set. You can change your mind at any time, and redesign the file if you wish. See the Help on Redesigning a File.
This is all TwoMake does: set up the file layout. Once it is completed to your satisfaction, choose "Save" from the file menu, give the new file an appropriate name, and save it. It is ready for TwoUse.
With a completely new file, fresh from TwoMake, records are added by clicking the mouse in any field(s), and typing in data. Once the record is filled in, select "Add" from the Record Menu, or control-A on the keyboard. The record is added and a blank form is presented with which the entire process can be repeated.
To review and edit data already in the file, select "Find Some" from the Record Menu, and fill in the criteria which will find the records in which you are interested. Select the "Find" button on the selection dialogue, and only those records you asked for will be found when "Next" or "Previous" records are asked for. To edit any record, select the field to be changed with the mouse, change its data, and then do anything else: ask for the "Next" such record, for instance. The altered record is automatically saved. While editing a record, you can move around from field to field with the Return, or up- and down- arrow keys.
At any time, selecting "Add" from the Record Menu will save the record if it has been changed, and blank the entire form in preparation for data entry.
To design a report, select "Design New" from the Report Menu. You are presented with a new window, in which the layout of each record on the report is determined. Select "Report Options," and set the record width and height. The size of the layout design window will be changed accordingly.
Click anywhere in the report layout design window. A report field will be created there. Click any data field in the file window, and the report field will print the data from that file field. Report fields can be sized by clicking in their lower right corners (where the mouse cursor looks like a pointing hand) and dragging to change the width and height of their print rectangle. They can be moved by clicking and dragging anywhere except the lower right corner.
The two blank lines at the top are headers, to be printed at the top of every page. Put any text you wish in the headers. A #d will be replaced with the current date upon printing, a #t with the time, and a #p with the page number.
Specify which records will be printed among all the records in the file with the record selection dialogue which appears when "Report Search" is selected from the menu bar. Specify in what order they will be printed by using "Report Sort."
Once the report design has been finalized, select anything from the menu bar except the lower six choices from Report. The report design will be finished, you will be asked to enter a name for the report, and it will be saved in the BaseTwo file for later access.
To print it, select "Print" from the Report Menu. A list of all the reports saved in the file will be displayed. Pick one, and choose the desired destination button: print to the screen, print to the printer, or make a text file on disk.
To design a DIF format, select "Design New" from the DIF Menu. You are presented with a new window, in which the fields slated for exchange and their order within each "Tuple" will be shown. See the documentation if you are uncertain about the terminology.
Click a field in the file window. That field will be displayed in the exchange window. Click that field in the exchange window, and it will be removed from that window. The list of fields in the exchange window is the list of fields which will be exchanged from each selected record in the file, and in that order.
Specify which records will be selected among all the records in the file with the record selection dialogue which appears when "Exchange Search" is selected from the menu bar. Specify in what order they will be written by using "Exchange Sort."
Select "Exchange Options" and ensure that everything in this catch-all category, which at the moment is just the file name, is as desired. With no name at all, you will be prompted for the actual name when the exchange is actually performed.
Once the DIF format design has been finalized, select anything from the menu bar except the lower four choices from DIF. The exchange design will be finished, you will be asked to enter a name for the DIF format, and it will be saved in the file.
To use it, select "Transfer" from the DIF Menu. A list of all the DIF designs saved in the file will be displayed. Pick one, and choose "OK."