Saturday, February 24, 2018

PK Harmony - Terminal Emulation for PICK, and more

The Idea


In another blog post I talked about how Synex Systems had taken what we did for Terry Winter and turned it into a terminal emulator that could capture data from Business BASIC and Wang BASIC systems.  The owners of that company decided to pursue creating a version that worked with PICK systems.  A deal was offered to me that included me getting my own IBM PC computer in return for doing this little project.  I accepted the deal with great excitement!

The initial concept was to copy what the PC Harmony product did. The idea was that the terminal emulator software would respond to a special escape sequence, that was not used by any terminal we knew of, to shift into data capture mode.  It would then screen-scrape the data into an ASCII file, and another tool would allow you to define a ruler on the columns and capture the data.

This had some limitations. If you had summary lines, they often didn't line up, and created problems.  Also, when data wrapped in a column, it created interesting problems.

PICK had a query language called English on Reality systems, and Access on PICK systems (it actually had a bunch of names, but those two were the most common.)  It started with "LIST {filename}..." or "SORT {filename}..." and then you specified dictionaries for the columns you wanted on your report.  Dictionaries ranged from simple references to a field, to complex computed values. There were no joins, but you could reach into another file, if you could find its key, and pull out fields.  It was a pretty rich language and was very commonly used.

The Solution

So, I wrote a PICK/BASIC program that mimicked the LIST/SORT commands, but was called PICK-PC, and instead of padding and wrapping data for a columnar format, it delimited it.  Because both the PC and the PICK system had problems with high-speed transfers, and because hardware and software interrupts on the PC could cause it to lose data, we had to create an error correcting data transfer protocol for serial I/O.

The first version didn't handle some of the more complex computed dictionaries, but you could use raw data and could use "translates" to pull data out of other files.  In a pinch, you could stage the data you wanted into another file and then PICK-PC the data over.  I worked with the PC developers to come up with an architecture and design that would be practical on the PICK side, but still leverage the power of the PC.

More Horsepower Needed

It didn't take too long to realize that I had a little problem. I did much of this development (to earn my new PC) at home. But at home I could either boot into my 5 MB PICK partition, or my 5 MB DOS partition.  It was impossible to test PICK pushing data at the DOS side of the PC, as only one could be active at a time.  I also quickly ran out of room on my 10MB drive, so the company gave me a second hard drive. A 20 MB Seagate drive.

After a while, the company bought two AT&T 6300 computers. These were clones that were equivalent the the IBM AT class machine, which was the next generation after the XT. The video below shows one of these booting up.



Now I had a PICK system and a DOS system that I could run at the same time.  Both computers were quite a bit faster than my XT class machine, too, so that was another benefit.

Additional Features

In addition, I designed and the team developed a number of additional features:

  • A scripting language that the PICK system could use to drive PC activity. You could do a number of things like change your current directory, create a directory, check for existence of a file, run a DOS command, program or batch file.  
  • A scripting language that you could run on the PC to drive activity on the PICK application.  
  • We allowed you to take data out of several formats and upload it into a file on your PICK system.
The full feature list of the production version is listed in the product brochure below:



My First Spectrum Show


We went to a Spectrum show in Las Vegas to show off our prototype and get market feedback.  That Spectrum show had a special room called "PC Labs", and we had a booth there.  The first time I was doing the demo, I showed a LIST statement displaying some data on a screen.  Then I said "Now here's something you haven't seen in PICK." and showed them the PICK-PC command.

It was completely unrehearsed, but that line became our "hook". Everyone for 3 or 4 booths away trotted over to see this "new thing they'd never seen on PICK"!

We pulled up the same data in Lotus 1-2-3.  We did another set of data and pushed into a Wordstar mail merge.

Trivia Note: Wordstar was the first WYSIWYG word processor with mail merge capability.

We left that show with pre-orders for the product, and a list of interested beta customers!

What I Learned


For me, there were several things I learned:
  • I discovered PC programming and was intrigued at the possibilities.
  • I discovered the incredible rush of working with a brilliant team of creative geniuses to come up with something of value. Software is so much like magic. You start with an idea in your head and wind up with something valuable that people are willing to pay money for!
  • I discovered the excitement of working with sales and marketing teams to get something I helped author go to market!
  • I learned more about serial I/O and data communications.
Finally, although we were far from accomplishing our vision for the host scripting we had developed, that vision was in line with a recent trend called Robotic Process Automation.  Interesting to see it coming to fruition some 30 years later!

Note: For a long time, the computer systems used by most libraries in North America was PICK based system sold by Dynix. Synex had an annual contract to sell Dynix PK Harmony licenses in bulk to allow data transfers to other systems.  Our customers also included the largest McDonald's franchise in North America (in Florida), the London Underground system, and other companies, including  fortune 500 companies, that were using PICK systems in all industries and in countries around the world.  This was great exposure for me.

Sunday, February 18, 2018

Data Transfer from COBOL to REALITY and Back

First City Trust

While working for DataSense, one of the more active customers was First City Trust.  DataSense had software that was built for Canadian Trust companies, and First City was a big customer of theirs. I worked with a number of other Trust companies but First City was the one I spent the most time with.

First City had migrated their core deposit taking software to an IBM mainframe, but continued to run a number of business units on the Microdata Reality system.  This included mortgage banking (where they administered loans) and leasing. There may have been more but those two come to mind.

COBOL to Reality and Back

Because of Reality's convenient query and reporting language (called English on Reality, but other PICK systems called it Access), it was way faster to do reporting on the Reality system, so whenever management wanted a report from the mainframe, the quickest way was to get the data to the Reality system.

I wound up working with one of the First City IT people who knew COBOL to come up with a format that we could import into Reality. We had to do EBCDIC conversions and had to read the fixed width fields. This was a breeze compared with what I had had to do with the Terry Winter conversion, so I was always quick to create the imports for these. In some cases, I would create resulting data that would be EBCDIC converted and written to tape to go back to the IBM.

I wound up using the IBM terminals to track my time on the mainframe, and got used to using their messaging system.

Resetting Reports

First City had a printing system that was over 20 feet long.  They printed a ton of paper every day.  They also had to store a ton of reports. In an effort to reduce costs, they launched an initiative to figure out what reports were required, by whom, and were there other reports that would provide the information.

They managed to do some cleanup, but there were a large number of reports, some 100 or more pages long, that they were unsure if anyone needed them.

So they decided to take anything that they couldn't find an owner for and simply stop printing it, and see who complained.

Answer: No one...

I think they saved a few hundred acres of Amazon rain forest by that one initiative, reduced their storage and printing costs, and took an unnecessary load off of their computers!

Saturday, February 10, 2018

Pranks and Viruses

Over the years, at many places that I worked, the programmers I worked with were a fun bunch of people.  We'd have really intense discussions about technology and about how best to solve different problems, but ultimately, while we worked hard, we played hard, too.  Even the first viruses were more in the order of a prank compared with the ones we have today.

Changing User Prompt

One of the first pranks I encountered started out unintentionally when we were reverse engineering the Reality operating system.  We discovered a lot of interesting things, including that the very first byte (byte 0) of every frame (512 byte block of memory - that's how Reality organized memory) was not check-summed to ensure no corruption, but for one frame, it was actually used.  Both data and program space was organized by these 512 byte Frames. The first 12 bytes were used for linking and state information.  The rest was for data or machine code, for programs.

On PICK systems, the command line or shell mode was called Terminal Control Language (TCL).  The TCL prompt on Reality was a colon ":". For other PICK systems, they went with the greater than sign ">".

These first PICK systems, were what we called "Native" systems, where they provided the full operating system. Later versions ran as a shell on top of Windows, Unix, Linux and other platforms.  Prime Information was the first one to run as a shell, on PrimeOS, but it was the rare one. On these native versions, the first, lowest numbered frames were where the "operating system" and user assembly programs were typically loaded.  For most of them, frame 6 was the one that handled user terminal I/O.

On most PICK systems, byte 0 of frame 6 held the TCL prompt character.  If you had access to the system debugger, you could change that byte to any character that you wanted.

Be aware that while the TCL prompt character was ":", the BASIC debugger prompt was "$", and the system debugger prompt was "!".  These prompt characters would tell you that you were in different states.

When we discovered this, we changed it to another character to see what would happen. This was on a multi-user system, and we had other programmers doing work. As we changed it, we could hear swearing from the next room. We hadn't intended this as a prank, but it was too good to pass up! For fun, we changed it to the BASIC debugger prompt.  More swearing.  How about the system debugger prompt (this was getting too much fun!)  The swearing was sounding worried.  Then we changed it to the character that cleared the terminal screen.  This was too much!  The programmer in the next room came running over to say that the computer was having serious problems, only to find us laughing uncontrollably!  He realized he'd been had!

ERRMSG 3

On all PICK systems, there was a file that controlled the error messages.  While you could mess with any of them, by convention this was frowned on, with the exception of ERRMSG 3.  This ERRMSG simply printed the words "VERB?" and returned to the TCL prompt.  It was the error message you got if you mistyped a TCL command or intentionally typed random garbage at TCL and pressed return.

>ED ERRMSG 3
TOP
.P
001 E VERB?
EOI 001
.EX
'3' EXITED

>FOO
[3] VERB?

It was generally considered OK to make changes to this ERRMSG.  For most customers, this would be a simple change to something like "WHAT???" or "SAY AGAIN?", but for a couple of our customers, they were always on the lookout for something really elaborate or different to put in it. I saw some that were like 12 lines of text, suggesting you present yourself for a Bozo award.  Finally, one customer changed it to "BUTTERFINGERS!". Unfortunately, there was a worker in a warehouse of theirs who had really big fingers, and was convinced that it was personal. That was the end of them changing that error message!

Water Detected in Drive A

In the early days of DOS, I remember finding this program called "Drain". It was actually an executable called "drain.com".  You'd run it, and it would create what looked like a DOS prompt "A:\>".  The moment you typed anything, it would send a beep to the system speaker, and display an error message:

"Water detected in drive A"

The cursor would flash for about 3 seconds, then it would display another message:

"Starting rinse cycle"

Now spinning a 5 1/4 inch floppy drive made a sound a bit like a washing machine on rinse or spin cycle. Enough that you got the idea. It ran the rinse cycle for about 5 seconds, then printed out:

"Starting spin cycle"

This ran for another 5 seconds.

It would end with a message saying something to the effect of "Drive A is now dry - you may resume work." and it would drop to the DOS prompt.

My wife was volunteering as secretary at our church and she ran it, then called the pastor over, telling him something was wrong with the computer.  Great fun!

Update 2018-05-28: I found a link complete with screen shots!




Airplane Pilot Attempts to Outrun Electrons

One story a colleague of mine tells is of a software package that they had developed for airplane maintenance. The computer also had a word processor called JET and pilots would often use this to write letters.  They were at the Boundary Bay airport and a pilot was using the system as a word processor to write up a letter.  In typical style, still emulated by software programs today, if you typed the keystrokes that would delete your document, the program would ask if you really wanted to delete the document and you could type "Y"es or "N"o, followed by Return.  If you typed "Y" followed by Return, the program would tell you that document "xxxxx" has been deleted.

The pilot did the wrong keystrokes, and had typed "Y" + Return, and got the message saying his document was deleted, before he realized what it had asked him.  The quick-thinking pilot reached over his terminal (they were quite big affairs - see below) and yanked the serial cable out, then ran like mad to the computer room where he pulled the serial cables out of the back of the computer. Then he walked over to my colleague, Jan, who was watching all this in disbelief from another room, and asked her if she thought he was fast enough to stop his document from deleting!


The pilot reached over this and pulled out the serial cable on the back

Coffee Machine is Access Protected

One of the error messages that the computer would occasionally display was one that indicated that an operating system function had tried to access memory that they were not permitted to access or that was not properly initialized.  The message was to the effect that something "... IS ACCESS PROTECTED". It would then display the message "Abort @n.m". "n" was a frame number and the "m" part was the offset within that frame. This was the address of the program instruction that encountered the error.  It would then drop you into the system debugger, with the exclamation prompt "!".

Encouraged by the antics of other programmers that I knew, when working at First City Trust, I decided to create my own program for locking out my terminal while I went for coffee or lunch. I created a program that displayed what looked like a blank screen with a TCL prompt ":".  The first two times you typed anything into it, it would print the "VERB?" output, giving people the idea that they either mis-typed, or something else was going on.  On the third attempt, it would print the message:

COFFEE MACHINE IS ACCESS PROTECTED"
ABORT @12:00 noon
!

The exclamation mark "!" made it look like the system debugger.  At any of these prompts you could type a special password and you'd drop out to real TCL.  If you typed anything else into that last "!", it would display messages to this effect:

DELETE-ACCOUNT SYSPROG
ARE YOU SURE (Y/N)?

Regardless what you typed, it then displayed

DELETING SYSPROG
....

(SYSPROG was like the root account for these PICK systems.)

Finally the dots would stop displaying and it would log you off.

Note: No real SYSPROG accounts were ever hurt in the running of this program...


April Fools Day Endless Reboot

When I worked at Synex Systems, one April 1st, one of the programmers pulled a prank on all the other programmers.  The night before, he stayed late and changed every programmer's computer's autoexec.bat file to run a program that forced a coldboot just before finishing.

The effect of this was an endless reboot.  The first people arrived, started their computers and walked away. They'd come back with a coffee and the computer was still booting. OK, computers were slow at booting up (and many times still are), so they'd read a magazine for a few minutes. Finally, the realization dawned that this was taking too long, and that BIOS message they were looking at had already displayed twice...

You had to reboot off a floppy and edit that autoexec.bat file to fix it. That was a good April fools prank!

Stoned Virus

And then there was the stoned virus. It was one of the first real viruses, and very prevalent for a number of years.

When a computer boots up today, it looks for an operating system boot-loader in the "boot sector" of your hard drive. On the original IBM PCs and clones, the BIOS would start by checking drive A, then the fixed disk.  It was not uncommon for someone to load a program or data disk into drive A, forget it was there, and shut their machine down.  When they booted up the next time, they'd get an error message that the disk in drive A did not have an operating system on it.  You would remove the diskette and type Ctrl-Alt-Del to reboot.

The stoned virus was called a "boot sector virus". When you left an infected diskette in drive A, it would actually run a program that scanned your computer for diskettes and hard drives, and would add itself into the boot sector. Then it would display a message on your screen saying "This computer is now stoned." and it would print the standard error message saying that the diskette in drive A did not have an operating system.  You'd take the diskette out and reboot and all would look good. If you worked at Synex, you'd be convinced that one of those darned programmers put that "stoned" message on your computer as a prank.

Thereafter, every time you booted your computer, it would run this stub before running the operating system. Any diskettes you left in, it would attempt to write to the boot sector and infect it during boot-up. After boot-up, any diskette you put in, the now-infected operating system would attempt to infect with this virus.  Although I heard rumours that this virus would occasionally randomly delete files, to my knowledge, other than replicating itself, the only other thing I ever saw it do was occasionally it would display "This computer is stoned" message randomly during operating system boot-up.  These were the days of relatively benign viruses.

I knew of a company that published 6,000 diskettes to go out along with copies of Aldus Pagemaker, only to be told by Aldus that all of these diskettes were infected with the stoned virus!

We got in the habit of write-protecting all our floppy diskettes that we sent out to prevent our media from being infected.

This practice came in handy on multiple occasions. One such occasion was when I was at a large New York law firm, and someone came to me to say that there was something wrong with my diskette. I looked and he had an error message about not being able to write to the diskette. I pointed out that he should never write to our diskette, then got him the program that checked for the stoned virus.  He ran it and it turned out that every computer in the IT group had this virus!

Virtual Hand-Brake

And finally, in the same vein as the aforementioned airplane pilot, I leave you with an innovation that a number of us came up with, but no one ever figured out how to implement: The virtual hand-brake!

Have you ever had one of those times when you realized that the computer was causing havoc faster than you could undo it?  You need a virtual hand-brake!

I could probably go on for hours, but it's been long enough for today!  I hope you enjoyed this little trip down memory lane!

Saturday, February 3, 2018

My First Computer!

The company made an offer to some of their employees, including me. There were a number of opportunities available, and if you agreed, on your own time, to create one of the suggested products, the company would buy an IBM PC XT, and you would over time become the owner.  I'll talk about the project I was offered in another post.

So, I got my first computer. It was the IBM PC XT. It had dual floppy drives and a 10 MB Shugart hard drive.  Terry Winter had a 10 MB hard drive that was larger than most modern desktop systems, so I was impressed with how small it was, and convinced I wouldn't run out of space for a long time.  Was I ever wrong!

Partitioned half the hard drive and would boot into R83 from Pick Systems.  At that point, half my drive was unavailable for DOS stuff.

Then, I got hold of something called Revelation version G.2, and shortly thereafter, a bug-fix of G.2b.

This took up some of my space and I started creating applications with it. I had two applications that my church used for tracking finances and Sunday School attendance.

The Rev G.2b application I wrote for my church - still runs under DOSBOX!


The final blow was when I got a Mark Williams C compiler.  Suddenly, I had to manage my space, and back things onto floppy (never just one, it was always a series of floppys.)

The problem with backups on floppy was that the likelihood that one diskette having an error was fairly low, but when you multiplied that by 4 or 5 floppies, the likelihood went up. If you took one backup, you'd have a bad floppy. If you took two, you'd have a bad floppy in each. If you took three, all three would be fine!  Did I mention that floppies were slow? They were just slow enough to drive you crazy, and just fast enough that you couldn't really do anything else. And this was DOS. If you were copying to a floppy, you were not doing anything else!

Still, it was exciting times, and I loved the amazing new technology!

We changed the company name.  It was Toga Computer Services ("To"ny and "Ga"ry were the founders - hence "Toga".)  Occasionally we'd get calls from people who thought we were a laundromat.  The new name was Datasense.