Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 11 / NOVEMBER 1983 / PAGE 324

TRS-80 strings. (column) Stephen B. Gray.

Looking at the fifty-seventh variation on a TRS-80 theme, we see that it consists of a single subject: the Profile III Plus database management system, which has been called "probably the greatest program Radio Shack has released." Plus a short program that lets you twinkle a little. Profile III Plus

Many personal computer owners use their machines mostly or entirely for word processing or "electronic filing," an office-of-the-future phrase for the storage and retrieval of data with the help of a computer.

For the TRS-80 user, Radio Shack offers the Scripsit and SuperScripsit word processing program. For personalized electronic filing, Radio Shack has the Profile database management system, or DBMS for short.

Profile was first introduced for the TRS-80 model I and III in the RSC-4 catalog dated 1981: "Stores information of any kind. Keeps track of names and addresses, records, or even personal references. You can specify both display and printout formats. Powerful editing features make changes easy. Files can be interactive with simple Basic Programs. (32K, one disk) . . . $79.95."

Profile II, for the TRS-80 Model II, was introduced in the same RSC-4 catalog. At $179, it stores more records than the I/III version and is more versatile. Profile II stores up to 99 data fields in a single record, and stores up to 3000 records with a one-disk Model II/12 system. Files can be searched by any one of 36 user-defined fields.

Profile Plus for the II/12 is an expanded version of Profile II, with many extras, priced at $299. It permits arithmetic operations between fields, with up to 16 equations of 63 characters each. Among the many advanced features of Profile Plus is selectable record lengths, which prevents wasted disk space.

The $199 price of Profile III Plus, for the III/4 with two disk drives and at least 48K of memory, reflects its use of most of the Profile II features. It stores up to 2500 one-segment, 100-character records. Records can be 1020 characters long, with up to 99 fields per record. Up to 36 search fields can be defined by the user.

Profile for the I/III is still available at $79.95, but is now described as "ideal when changes are infrequent."

The $299 hard disk version of Profile III Plus increases the number of records in the system and offers extra sorting features. Setting Up a Database

The Profile III Plus manual shows in great detail how to set up a database, using as an example a company whose salesmen sell encyclopedias. Defining Files

The package comes with two disks. Insert the Creation disk in drive 0, and the first display is the Creation menu which offers eight "create" functions for setting up and designing layouts for databases.

First, tell Profile III Plus what information you want in your database (called a file in this DBMS), and what named you want to give it. You start with item I, Define Files.

The display asks you to:

Enter File Name so you type:

SALESMEN and press ENTER. Eight spaces are available for database names.

The display then asks you to:

Mount RUNTIME Disk so you put it in drive 1. This will eventually contain all the display screens, report formats, label formats, and user menus you generate with the Creation disk. Once is Runtime disk is completed, you no longer need the Creation disk to use your new database.

The display asks if the file is new. Press Y and ENTER, and this question won't appear again when you work on the Salesmen database.

The screen shows:

File Currently Contains 0 Segments

Enter Segment # (1-1) A segment consists of the related fields that contain data. One segment might contain name, address, and phone-number fields, while another might contain a spouse name, hobbies, and other such fields.

You can have up to four segments in each Profile III Plus database. This lets you spread the data over four disk drives, if you wish. The first segment is the most important. The fields you enter into this segment, called the Key segment, can be used later as search and sort fields to retrieve individuals records. Segments 2 through 4 contain data only.

Salesmen contains no segments at this point. You can only enter Segment 1. Later, when you have defined other segments, the numbers in parentheses change to let you access any segment you have defined or let you create a new segment.

For example, with two existing segments in a database, the parentheses show (1-3), which means you can access Segment 1 and 2, or create Segment 3. Defining Segment 1

Type 1 and press ENTER, and the screen shows:

Below that is a line asking you to enter a field heading. This is the beginning step for setting up a database. At the left of the screen is the field number 1.

The first heading you want to use is the salesman's district, so you type:


Enter Max Field Length--the number of spaces you want to be available for entering data in this field. So, after looking through the district names to see how long they are, you type:


When you do, the three numbers in the top half of the display change because you have reduced the Number of Fields Remaining (by 1) to 35, reduced the Characters Remaining For Fields (by 10) to 245, and reduced the Characters Remaining For Headings (by 10) to 191.

Now you enter the remaining fields you have chosen for this first segment, along with the maximum field length of each:

The three abbreviations in fields 4-6 stand for Library sets, Deluxe Home sets, and Home sets.

When you have entered all the fields, press ENTER to return to the Creation menu. If necessary, you can review the first segment of Salesmen by pressing I and then entering Salesmen, and the screen will display field numbers, headings, and lengths. The bottom of the screen provides four options: Hardcopy (print a list of the defined fields in the segment); Replace (for redefining segments); Add Fields; and Next Segment (to define or review the next segment). Defining Segments 2-4

Now you define the other segments, adding fields for salesmen's data in Segment 2 (first name, address, phone, date hired, total sales by unit); fields for dollar value of sales in Segment 3 (month by month, with annual total); and fields for volume and dollar amounts for each type of set in Segment 4. Defining Screens

The next step is to design the way you want Profile III Plus to prompt you on the screen for the data required when you enter the data. You can design up to five screens for each database.

In the manual, you design two screens for Salesmen. One screen prompts for monthly statistics, the other for yearly statistics. So you use a dozen "field indicators" to tell Profile III Plus the type of data each field is to contain, such as * for an alphanumeric field, # for a numeric field (accepts only numbers, decimal points, and minus signs), ! for a protected field (contains data that can be displayed but not changed from the keyboard), and so forth.

By the time you have finished designing the first screen, it should look like Figure 1. Defining Math Formulas

At this point you need to define math formulas to compute values for your screen. So you set up formulas that, for example, multiply the number of Library Sets by the commission. The last formula totals the various commissions.

This is a powerful feature, which allows you to use the four basic math functions to write up to 16 formulas, using up to 20 fields per formula. You can calculate commissions, subtotals, totals, taxes, and so on.

Next you design the screen for yearly statistics. Now you are ready to enter data. Entering Data

During data entry, you don't need the Creation disk; you need only the Runtime disk in drive 0, and any data disk(s) on which you want to store your files in drives 1, 2 or 3. You should, of course, periodically back up these data disks.

By typing RM and pressing ENTER, you call up the Runtime menu:

Use selection 1 to create room on the disk to store records, 2 to specify a field on which to sort records, and 3 to run the main part of Profile III Plus, where you enter, delete, edit, and search data.

Selection 6 lets you specify a sort field and up to 16 selection fields to select records to merge with SuperScripsit. Selection 7 does the same for passing records to VisiCalc. Searching Records

You can use any of the fields entered in Selection 3 (Inquire, Update, Add) to search for specific records or a group of records.

You might want to search for all salesmen whose last names occur alphabetically after Johnson. At the Runtime menu, press Selection 3, enter Salesmen, and type:

Johnson and a relationship abbreviation. In this case you want all the names "greater than" Johnson, so you enter:

GT and all the names after Johnson are displayed.

The screen now shows:

Enter Connective (AND, OR, ENTER) to let you further limit the search. If you type:

AND you are asked for a second field number, and the data for those salesmen whose names appear after Johnson are searched for a second criterion, such as all those who are over 40. Only those records that satisfy both after (after-Johnsons over 40) are then displayed.

A wild-card symbol (=) makes Profile III Plus show you all records that contain anything in a certain field or part of a field. For example, to find everything entered during February 1983, you can scan for:

02/= =/83 Indexing

An indexing feature lets you look through your records in alphabetical or numerical order, using any field from Segment 1. You can start at any point in the database and go either forward or backward. But before you can do any indexing, you must tell the computer which field(s) you want to use with the Build Index program on the Runtime menu. Report Formats

The next step is to define report formats, for printing reports. Profile III Plus lets you define up to five different reports for each database.

You set up the reports very much like defining screens for data entry. You determine what is to be printed where, what totals are to be calculated, and on which fields the data are to be sorted before printing.

Each format can include up to two title lines, three header lines, and up to 66 lines or one or two-line detail information. Reports can be dated, paginated, and printed up to 132 columns wide.

If you want to print labels, such as for mailing letters to salesmen, you also define the field formats. SuperScripsit and VisiCalc

Selection 5 on the Creation menu is for merging Profile III Plus with Model III SuperScripsit to print form letters and documents. This creates the familiar "computerized" letter, which can print, in the body of the letter, variable data such as first name, sales figures, and so on.

Profile III Plus allows you to use VisiCalc with your databases. You need the VisiCalc program disk, of course. You can select up to 16 fields to pass to VisiCalc. Password Protection

Profile III Plus provides your database with limited security. You can use passwords to protect screens, which will not be displayed without the user having entered the proper passwords. Profile III Plus Manual The 202-page manual shows in great detail how to create and use Profile III Plus, with extensive examples. The last 73 pages consist of a Reference Guide (to check information quickly) and Appendixes (making backups, formatting data disks, printouts of all the Salesmen files, a glossary, and so forth). Learning By Doing

Although the manual is detailed, you learn almost as much when you try to use the program, as you do reading about it. However, once yu get underway, you will be quite impressed by its speed and flexiblity. You can easily switch from one component program to another, and screens and report formats are easily designed.

Of course, the first time through takes a while unless you have had some experience with database systems. Even then, you have to become familiar with the Profile III Plus way of doing things.

Many little decisions must be made the first time, such as how many spaces to allow for names and addresses, what headings to use for reports, and so on. You must remember how to get from one component program to another. The first time you try to search the files, it may not work, or not in the way you expected, especially if you skimmed over the manual and didn't read all the details.

The Creation and Runtime disks both contain TRSDOS 1.3, which means Profile III Plus isn't compatible with any other operating system, if you prefer DOSPLUS or LDOS.

At $199, Profile III Plus isn't cheap, but it has a great many advantages, such as convenience of use, interfaces to SuperScripsit and VisiCalc, password protection, and arithmetic operations.

If you think you need your own electronic filing system, you might want to check out this one at a Radio Shack Computer Center. If you have enough time to understand and appreciate the many sophisticated features of Profile III Plus, you will probably want it. Short Program 44: Twinkle

George Collins' letter, which had no return address, said: "My 13-year-old daughter Dawn was sitting at the TRS-80 Model I, putting dots on the screen. I thought I could use her program to illustrate graphically to her the abstract notion of a random process. The program listed below might be of general interest to young programmers since the dynamic aspect of random processes can be easily visualized. The program randomly sets and resets pixels on the screen for a twinkling effect."

Well, not quite a twinkling effect. Twinkling stars change in brightness; they doon't turn on and off. This is a problem if you want to produce a twinkling effect with pixels that have only two states: on and off.

Although the program may achieve George's aim, there must be better ways to approximate twinkling stars. George's program sets pixels randomly, then resets some. Note that there are two RESET statements for every SET statement. So can you figure out why line 70 doesn't eventually turn off all the pixels?

Can you write a program that creates a field of stars, then turns off a star and immediately turns it back on again, and does it randomly across the field? Or can you approach the twinkle effect by other methods? Can it be done effectively in Basic or only in assembly language?

Here is a program that provides a twinkle of sorts:

However, it twinkles each star only once as it turns on that star. Call for Shorties

We are running out of short programs for this column, so if you have written a new and different program that might fit here, please send it to me at the magazine.

Computer printouts are preferred, because they are subject to fewer errors. In addition, please explain any tricky lines.