Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 12 / DECEMBER 1983 / PAGE 86

The Tool; a program generator cum programming utility. Terry Harmer.

The Tool

A Program Generator cum Programming Utility

The last program you will ever have to buy!! At last . . . No more programming!! Does all your programming for you!!!

Make your programming easier!!! Program in one-third the time!!!! Simplify your programming and make your programs run faster!!

Such are the claims of program generators and programming utilities. Some programming utilities (like the Apple renumber utility) are very simple. The more exotic ones will reduce a program in Basic to one in machine language (a compiler).

A program generator will write a program for you (usually in Basic). Simple program generators will write menus; sophisticated ones will write entire programs.

The Tool from High Technology Software Inc. is neither a program generator nor a programming utility. It is a bit of both. On the one hand it generates code, but not in Basic. On the other hand it does not work on your program, but is intimately connected to it. What The Tool really does is write machine language subroutines according to your specifications. These routines are accessed by an Applesoft Basic program that you write.

How Does It Work?

The Tool has three segments. The Screen Formatter creates screen formats and input fields, and allows complete error checking and input validation. The Database Manager allows you to create a database system customized for your own purposes which, in a very sophisticated manner stores, sorts, deletes, or modifies information on disk. It requires no knowledge of DOS to use. The Report Generator allows you to define the report titles, column headers (columns can be various widths), variables and how they print (you can print just part of a variable), and line spacing. The Tool formats and stores the report specifications, complete with print-time calculations, pagination, titles, and headers.

Each of these Tool functions is separate and distinct and may be used independently, but none will work without a program written in Applesoft.

Constructing a Tool System

The Tool places very few restrictions on your programming; you can even use your own machine language routines in addition to those of The Tool. Access to The Tool is by means of commands from your Basic program to a Tool module called the Dispatcher. The Dispatcher relays your instructions to the run-time system, which in turn calls and manipulates the Tool modules than you have designed.

The Screen Formatter

Designing a screen with The Tool takes place in four steps:


This process is very much like writing out the screen on a word processor. You have options for deleting, adding, inserting and moving text (and input or display fields). Figure 1 is an example of a Tool screen the way it would appear to a user of the final program.

The Database Manager

The Tool can also handle your database needs. It is an ISAM database with all the records automatically stored and retrieved in key order. It uses a "virtual DOS' that is not compatible with Apple DOS but does allow much more data per disk. Don't worry about being compatible with Apple DOS; you can access the Apple DOS from within The Tool, so regular DOS functions are supported. The only requirement is that you include the volume number with each DOS command.

Defining The Database

You must define for The Tool what the sort key will be, choose which fields are to be included in the key, and decide how many characters of each field will be included. Your records will be stored and retrieved in that key order. There can be any combination of fields up to a maximum length of 62 characters.

The Database Manager allows you to add, delete, or modify records very simply. It keeps track of all the volumes (capacity 253 disks--up to 15 million records) pointers, records, and so forth. The only real constraint is that you must specify the volume number(s) when you are initializing the data disks, and you must be able to tell The Tool ahead of time the maximum number of records the database will contain.

The Report Generator

Designing reports is similar to designing screens. You first must define for The Tool what the general format of the report will be. You are given a screen, and you define the report title, column headers, which fields will be in what columns, how much of each field will be printed, and various other information about line spacing between records and so forth. When this is done, you have finished formatting the report, at least in terms of its visual format.

Report Calculations

The report generation facilities include nine mathematical functions that can be performed on the various lines of your report. These include add, subtract, multiply, divide, and absolute value. You can use either variables or constants in these operations.

Cobol Pictures

A Cobol picture is used for formatting numeric output in your reports. It allows you to define what the number will look like, regardless of what the actual number is. For example, you can either print or suppress leading zeros. There are ten different functions which can be combined. The end result is that you can format your numbers any way you want without any complicated coding in Basic.

Are We Done Yet?

At this point we have linked and compiled the screens. We have merged the reports into one binary file. The database has been defined and created. Now to put them all together The Tool creates a Run Time System (RTS).

You tell The Tool whether this particular application will use the screen formatter, the report generator, or both. The Tool then creates the system that will use the screens and reports you have designed.

We now need to be able to tell the RTS when we want a particular screen or a particular report. This is done by means of the Dispatcher. The Dispatcher provides the link between your Basic program and the RTS. The Dispatcher responds to commands that are in your Basic program.

Some Simple Instructions

In its simplest form, the Basic program will have commands that are something like this:

90 & OPEN #1, "EXAMPLE, V1'

This opens the database part of the program. It gets the Database Manager ready to store information. The ampersand wakes up the RTS and signals that a dispatcher command is coming. The #1 is the information channel to that database (you can have up to nine databases active at the same time).

There are fourteen Dispatcher commands. These plus the ability to shift back and forth between your Basic program and the Tool modules yield an enormous flexibility. They also guarantee that what The Tool cannot (or isn't intended) to do, you can do with your Basic program.


There are many programs competing for your dollar. The Tool at $395 competes for quite a few of your dollars. People who do not write in machine language, or who do not know how the latest disk filing systems work, but who can figure our needed applications will find The Tool indispensable. It is not intended for the casual programmer who may want to whip together a little mailing list once a year. But those who have lots of programs they would like to write (and do not write code quickly) will find that The Tool will greatly increase their productivity.

Photo: Figure 1. A Tool screen the way the user would see it.

Products: High Technology Software The Tool (computer program)