• Please review our updated Terms and Rules here

How were business apps done in BASIC?

whartung

Veteran Member
Joined
Apr 23, 2020
Messages
749
How were business apps done in BASIC back in the day?

Nowadays, and even back then, there are/were more specialized tools focused on doing things like Inventory, and Accounting, and other back office systems.

A key component of most, if not all, of these systems was some kind of (likely) B+Tree indexing system for the data records on disk. An index system was pretty much a built in feature of COBOL (and one reason for its popularity in this space).

But, while there were certainly some external libraries that could be used to add that indexing capability to BASIC, many BASICs did not come with that capability built-in.

None of the MS BASICs did. The original DEC BASIC-PLUS did not have a B-Tree facility. CBASIC, a compiled BASIC, certainly didn't. Even more modern "QBASIC", QuickBasic, never provided that facility out of the box. Many of the third party BASICs lacked it as well.

Yet, applications were built, BASIC was quite popular for these applications.

Curious if anyone here was deep in the trenches in this space back in the day, and what tips and tricks and techniques were used to work around the lack of a generic indexing facility.

Clearly you could use the idea of a "primary key" (i.e. the record number), but seems like there's a lot of scanning and sorting to get beyond that. Did you make your own ad hoc indexes? Hashing?

And, of course, while I mention BASIC, other languages suffered the same issue, but had similar facilities for record I/O that BASIC has (i.e random records fetching and updating). So in that sense the techniques were mostly universal.
 
I'm privileged to say that I was the author of a business BASIC (manual is on archive.org). None of this B+ tree stuff--just an integrated ISAM. Decimal arithmetic. I have sample code if you're curious.
There were plenty of business applications written for CP/M in CBASIC.
One of the legendary vendors of business applications is MCBA, software originally written in DG BASIC.
 
This was raised on this forum (I think) not very long ago.

Someone asked about one of the indexing utilities - a memory resident utility that was loaded, and then called with parameters. I replied referring to another similar system that I had used with CBASIC. Might have been in a 'programming' section here?

Evidently, there were more that those two. As I remember it, the one I was using with CBASIC could be used with other languages, the calling interface was general enough to allow this.

I'll see if I can find the previous mentions - not too long ago.

Geoff
 
We used the Vandata bookkeeping system in the early 80s. It was written in CBASIC with minor ASM extensions for keyboard input. I believe they derived it from a version shipped by Osborne. Worked very nicely and was reasonably responsive.
 
Check the archives of Doctor Dobb's. What I remember is B-Tree databases for the IBM became very common after the mid-80s. Earlier products had to use other databases. While ISAM was baked into a number of BASICs, there was a lot of roll your own databases with variable quality.

The weirdest business application marketing was a multi-volume set of relatively large type-ins of business programs. It would be a good guide as to the actual mid-70s business application concepts though the print was challenging to read in the paper version and the poorly done scans that used to exist were even worse.
 
ISAM is simple to do in just about any language--you have a file of data records and one or more (sorted) index files.
I guess the primary difference between ISAM and B-Tree is that B-Tree is self maintaining (to a point), whereas ISAM appears to need to be reorganized after some period of activity to maintain performance.

I was curious as to the workflow about when the indexes were rebuilt. I can easily see it being a weekly task, fire off the rebuilds on Friday as you're leaving the office.

Trying to imagine someone at a desk with a CP/M machine and a pair of floppies swapping them back and forth as the program does the sorting and merging.

I used to do work in BASIC, but we had B-Tree indexes for our system. We had index rebuild programs as well, we typically ran those when the indexes became corrupted (typically from the program or machine crashing). Whenever some problem cropped up, step 1 on the checklist was almost inevitably "rebuild the indexes".

An external sort utility can be very powerful. Scan through the data, create the raw file, fire off the external sort utility, and then scan the resulting file for a report. We had that facility on our system, but we rarely used it. We relied on indexes for most of our work.

What I remember is B-Tree databases for the IBM became very common after the mid-80s.
Yea, B-Tree systems were really popular BTrieve was the big one, bit Faircom (I think) had a lot of presence in the magazines as well. DBase and all of its ilk, of course, was a B-Tree system. I wrote some code using the C Toolbox Database (source code in a book and floppy for $20). That worked fine.

It just interesting I never saw much literature in the interim talking about this problem, notably with BASICs. I think by the time I was really looking at this, it was a bit late and the B-Tree pretty well took over. I, frankly, always conflated B-Tree with ISAM. Never really occurred to me that they were fundamentally different.
 
IIRC, before our system shipped with a hard disk, it was mostly a matter of copying one ISAM file to another on a second drive. I recall that the maintenance routine was done in BASIC also. Copying files on a floppy-based system was pretty much required--floppies are not known for durability, so copying/reorganizing an ISAM file served the extra job of backing data up. B-Tree was useful if you had a hard disk, but not a lot of benefit if you were running floppies. When we migrated the BASIC to Xenix, we did use a third-party B-tree package (I don't recall whose) instead of the ISAM one.
 
Microsoft BASIC Professional Development System (also known as PDS) 7.0 and 7.1 include ISAM. I think PDS is like the professional version of QuickBASIC or the evolution of the older BASIC Compiler.

the 7.1 Getting Started book said:
The Indexed Sequential Access Method package provides a fast and simple method for
accessing specific records in large and complex data files . Microsoft BASIC integrates all
ISAM statements and functions with the BASIC language . BASIC ISAM includes statements
for transaction processing and for data retrieval and manipulation .
In version 7 .1, ISAM statements and functions are supported for OS/2 as well as DOS .
Microsoft BASIC also includes several utilities for use with ISAM files created with BASIC :
• ISAMCVT .EXE (DOS only) converts Btrieve and dBASE files for use with ISAM .
• ISAMREPR .EXE repairs corrupted ISAM databases .
• ISAMPACK .EXE compacts ISAM files to save disk space .
• ISAMIO.EXE converts ASCII files to ISAM format and vice versa .

I haven't tried it, but hope to one day to see what it would have been like to write business applications in BASIC, so found this a very interesting thread, thanks!
 
Yes, that was a later version of BASIC. And it did, indeed, bundle an ISAM component. Several BASICs, particularly on mini's, had some ISAM/BTREE subsystem. I did a lot of work on the AlphaMICRO with such a system. But it wasn't until these much later MS releases, that such a capabilities were bundled with the system (typically the "PRO" version). In contrast to the earlier BASICs from the 8-bit and early PC era which had little more than random access files. There were 3rd party libraries that you bolt on to those systems, but it was not an out of the box capability.

And I know lots of systems were written with the stock BASICs, so I was curious how it was done when these facilities where not available.
 
I can remember when S/360 DOS had to rely on a set of assembly language subroutines to support ISAM on their COBOL. Didn't last long--eventually it was fixed, but I used to have the official documentation for the details. ENTER LINKAGE, indeed.
 
The Tandy 600 has an extensive set of bolted on database routines though no indexes that I can see. With a maximum RAM capacity of 224KB plus a 360K floppy, I am not sure that indexes are as critical as they would be with databases covering many megabytes.
 
I wrote custom BASIC programs in the early 80's while working in the coated paper industry which entailed machine processing usage, cost analysis, and manhour accounting, and some other things. Eventually we went with customs software developed for the Tandy Model II. Upper management did not want to pay IBM prices back then. We also used some Tandy off the shelf software which was pretty good but somewhat limited in scope. I love to dabble in BASIC to this day.
 
I can't speak to the form of data structures used, but if you want to go spelunking in code, Apple published in 1979 a full business package (ledger + accts payable & receivable) called The Controller (developed by a third party) that was written entirely in BASIC. The set of disk images is here: https://archive.org/details/apple-the-controller-1.1

A representative sample of one random BAS file from one of the disks is attached here, but there are many many like this. It doesn't strike me from my vantage point as the most effective way to put together such software, but presumably it could be made to work well enough.
 

Attachments

  • GL60AC.BAS.txt
    16.2 KB · Views: 10
In the mid 80s I wrote a ton of business software in Basic. When MS-DOS came out, I remember using a TSR library called FABS plus. Unfortunately I can’t find any traces of it, although there is a relatively recent replacement:


It was pretty fast and quite sophisticated as it allowed to store (in separate index b-tree files) primary and secondary keys pointing to records in the data files.

The last version I used even allowed to maintain index files in a multiuser networked environment…

If you are interested I am sure I can find the original library in some old backup
 
How were business apps done in BASIC back in the day?

Nowadays, and even back then, there are/were more specialized tools focused on doing things like Inventory, and Accounting, and other back office systems.

A key component of most, if not all, of these systems was some kind of (likely) B+Tree indexing system for the data records on disk. An index system was pretty much a built in feature of COBOL (and one reason for its popularity in this space).

But, while there were certainly some external libraries that could be used to add that indexing capability to BASIC, many BASICs did not come with that capability built-in.

None of the MS BASICs did. The original DEC BASIC-PLUS did not have a B-Tree facility. CBASIC, a compiled BASIC, certainly didn't. Even more modern "QBASIC", QuickBasic, never provided that facility out of the box. Many of the third party BASICs lacked it as well.

Yet, applications were built, BASIC was quite popular for these applications.

Curious if anyone here was deep in the trenches in this space back in the day, and what tips and tricks and techniques were used to work around the lack of a generic indexing facility.

Clearly you could use the idea of a "primary key" (i.e. the record number), but seems like there's a lot of scanning and sorting to get beyond that. Did you make your own ad hoc indexes? Hashing?

And, of course, while I mention BASIC, other languages suffered the same issue, but had similar facilities for record I/O that BASIC has (i.e random records fetching and updating). So in that sense the techniques were mostly universal.

Certainly, developing business applications in BASIC back in the day presented unique challenges, especially when it came to handling data efficiently without built-in support for advanced indexing structures like B+Trees.
 
This is great information. I have been wondering the same thing. I would like to find some software for vintage hardware (Z80 CP/M or X86 DOS) that does accounting and inventory. It has perplexed me on how database and data storage was done. I am too young (37 currently) to have dealt with anything that doesn't have SQL type connections. I used Foxpro and Dbase a tiny bit, but it was to salvage data and import into SQL databases.

If I were to write software for older hardware with some type of database and with current technology, what is the best way to do that? Is there a way to integrate a MySQL connection into a basic or pascal program? maybe a way to use SQL through a serial port?
I don't mean to hijack the thread but this is very interesting and would love to hear more about how databases in the late 70's to early 80's functioned and a reliable way to reproduce the effect.
 
Don't forget the Pick System. When I worked on the CDC Zodiac system (late 60s, early 70s), the database wasn't a subset of the regular file system, but a system in its own right, independent of the OS native file system. In a few installations, it spanned well over 100 844-type disk drives and had its own indexing and allocation--sort of a free-form tree with multiple indices. IBM, of course, used mostly ISAM on their business applications.
 
Back
Top