Classic Computer Magazine Archive ANTIC VOL. 4, NO. 1 / MAY 1985

SON OF INFOBITS

Now you can save and edit your infobits files

by ANDY BARTON

This enhancement of the remarkably simple and popular file program from the December 1984 Antic provides an easy way to save, retrieve, edit and delete short notes and data. Written in BASIC, the all-new version is complete in this issue and will run on any Atari computer with a disk drive.

In the December 1984 Antic we ran a program called "Info Bits" by Andy Barton, author of TYPO II. Published primarily to demonstrate how much can be accomplished with a small amount of programming we described Info Bits as the "Simplest database ever!". We received many letters from readers who loved the program but wanted it just a little less simple.
   Specifically they wanted to know how to edit or erase some of the many entries they were putting into their "Info Bits" data files. We contacted Andy and received the following update. -ANTIC ED

INFOBITS MODIFIED
Info Bits was originally written as a hasty last effort, after two rejections, to get something published. It was purposely kept short, simple and direct, with no frills added. In this spirit, a "Delete Entry" routine was not included. (And, to be honest, I didn't think about it until some time later when I found I had no way to correct a typographical error in one of my entries.)

TYPING THE PROGRAMS
Listing 1 is the new Info Bits. (Filename: INFONEW.BAS.) Those of you who typed in the original program may notice a few matching lines, but there are many changes so you will probably be best served by typing in all of the new listing. Remember to check your typing with TYPO II and SAVE a copy of the program before running it.
   Listing 2 is a brief program which corrects a bug in the original Info Bits program by modifying its INFOBITS. FIL data file. If you have no Info Bit files yet, you can ignore this listing. Those who wish to use their previous INFOBITS.FIL entries with the new Info Bits must use this program to reconfigure their old files.
   After typing in Listing 2 with a TYPO II checkup and SAVEing a copy, place the disk with a copy of your INFOBITS.FIL on it. RUN listing 2 and it will remove the leading 10 blank spaces in front of each entry on the file. Note: Listing 2 was kept purposely short and contains no error trapping. Make sure your disk contains the INFOBITS.FIL before you run the program.

USING THE PROGRAM
Info Bits is a mini data base. You can type in notes and references and then retrieve them by searching for a key word or phrase-which can be anything in your entries.
   Before you can use Info Bits, you must create an empty file named INFOBITS. FIL on whichever disk is in drive one. To create the file, type in the following:

OPEN #l,8,0,"D:INFOBITS.FIL":
CLOSE #1 [RETURN]

   After you've done this, RUN the new INFOBITS and you'll see a menu with three choices: 1.) ADD TO FILE, 2.) SEARCH FOR ENTRY, and 3.) DELETE/(EDIT) ENTRY

ADD TO FILE
Press [1] [RETURN] and type in a couple of entries, pressing [RETURN] to mark the end of each entry. You don't need any special characters to mark off fields, simply type in a space or two. Each entry can be as long as 119 characters.
   When finished making entries, press [RETURN] at the "TYPE ENTRY:" prompt and you will return to the menu

SEARCHING FILES
To search for data, type [2] [RETURN] from the menu and you will see SEARCH FOR:. You may type in a word or portion of a word or a complete sentence. Enter your search criteria in capital letters and Info Bits will ignore case distinction in the data it searches.
   After entering your search criteria, press [RETURN] and Info Bits will display on screen every entry that contains an exact match of your criteria. If there is more than one screen, the program will pause and prompt you to press any key for more. If you wish to see all your entries, enter ALL at the prompt.

DELETING AND EDITING
Type [3] [RETURN] to select DELETE/ (EDIT) ENTRY. The screen is cleared and you are given 3 choices. First type [S] [RETURN] to search for the entry to be deleted. Repeat this step as often as necessary until the entry you wish to delete is the last one displayed.
   Type [D] [RETURN] to delete the last entry displayed. The actual entry being deleted will be displayed on the screen. If you are satisfied with the deletion simply press [RETURN] to return to the main menu. If not, press [Y] [RETURN] to edit it. And when you are ready to re-enter it again, press [RETURN].
   You are now in the ADD TO FILE routine of the main menu where you may continue adding entries when asked to TYPE ENTRY:. Or simply press [RETURN] on the blank line (an absolutely necessary step to properly close the disk file) and return to the main menu.
   The only safe place to exit Info Bits (turn off the computer or load another program) is from the main menu. If you exit in the ADD TO FILE or DELETE/EDIT routines the disk file will not be properly closed and part or all of it could be lost.

UPPER AND LOWER
Included in this version of Info Bits is a short addition to the machine language routine that allows it to ignore the differences between lower and upper case letters. This allows you to type entries in caps and lower case letters for aesthetic or other reasons and later find them without having to remember which way you entered them. However, your search strings must be in capital letters.
   If you prefer the original version which differentiates upper and lower case letters, simply replace the 5th through 10th numbers in DATA line 2002 with 234,234,234,234,234, 234.
   Given the infallibility of computers (ha,ha), not to mention that of the operator or programmer, I highly recommend that you regularly make a backup copy of your disk file (INFOBITS.FIL).
 

Many Antic readers owe Andy Barton a vote of thanks for his TYPO II line-by-line proofreading program, which we've been using with all our BASIC listings since January.

Listing 1   INFONEW.BAS Download

Listing 2   INFOMOD.BAS Download