Read virtual AWS files on a PDP-11 in Basic-Plus summary

Like a lot of dinosaurs I like to relive my computer past. My first job which I sought was on a DEC PDP-11/70 running the RSTS/E OS. We received alot of IBM customer tapes which we would read/process and add to our database. So since I already had many AWS tapes from my Hercules MVS testing, I decided this would be a fun project to sink my teeth into. I had created these AWS tapes using Jay Moseley’s maketape. I gave it a filename of CUST-TAPE-1000.aws, so I knew there were 1000 records in this virtual tape by the way I named it…a decent amount for a test. I also had a “tape” with 1 million records…not necessary for a test. However I forgot what was the content of this tape. Once again I turned to Jay Moseley’s tapedump to get the info. From this I got…

$ ./tapedump INPUT: CUST-TAPE-1000.aws
TAPEDUMP v1.0 (BASIC) copyright Jay Moseley, CCP 2000
Processing AWSTAPE file: CUST-TAPE-1000.aws
Serial Number from VOLume 1 label: VOL001
File MVT Dataset RECFM BLKSIZE LRECL BlocksExpected BlocksRead
0001 CUSTOMER.FILE B    16,400   164             10         10

You can also add a switch to let you look at the actual records. With the detail you can easily see where fields begin and end.

OK I have the data. The next thing I tackled was converting EBCDIC to ASCII which is the PDP-11s native format. These routines were already established when I was hired. So I think I came up a fairly good way to do this in Basic-Plus.

Next I had to see if I could even process AWS tapes on the PDP-11. But before even that, I had to define some tape drives to RSTS/E. Which meant a SYSGEN…which I didn’t want to do. I was perfectly happy up to this point using the pre-built RSTS V7.0-07, for my RSTS/E Basic-Plus enjoyment.

I found very little on using tapes in general let alone AWS tapes. I finally saw a comment, here, that led me to believe simh (the PDP emulator) could work with AWS tapes…but no examples. The AWS format wasn’t even listed as an option in the simh book (PDF).

Here are a few records from the the EBCDIC AWS input tape using the tapedump program

Once you can read the tape data, using Basic-Plus…you read a block with Basic-Plus’s GET statement, and using FIELD statements I could break these fixed length blocked records apart. Because IBM doesn’t use a new line character such as CR or LF to separate records.

Here is some output (which I showed in a earlier post) from the Basic-Plus program. I defined Account #, Last and First Name, and wrote them to a text file.

Below is a few records out of 1000.

PIP CUSTRC.TXT
4313823732834469            Petgrave                    Fabian         
4313768567626482            Schouten                    Robert         
4313251303989456            Keling                      Rodger         
4313825573004227            Cypher                      Raul           
4313181873894986            Massingale                  Juliana        
4313087137943172            Caamal                      Cary           
4313196239656267            Diefendorf                  Leonor         
4313416983633720            Woodend                     Otis           
4313273914282238            Smith                       Weston         
4313843895349824            Kaleo                       Raymond        
4313935972736152            Medine                      Karyn          
4313160683191320            Stose                       Richard        
4313183036785135            Zoeller                     Ada            
4313776948680839            Mariacher                   Jon            
4313621226845482            Shaak                       Donny          

After a lot of trial and error (I started this adventure 5/23/2023 and came to a good ending on 5/31/2023, so 8 days) I was able to re-create what we did…back in the day. A lot of trial and error mostly because of the quirky way simh would sometimes behave. For example the SYSGEN (which is rather lengthy) failed twice in the same place, because the simulator wouldn’t allow me to drop out of the SYSGEN…which was necessary at that point. I had already done this a few times previously in the SYSGEN. I’d get Protection violations one day and not the next. This was the newest version of Open simh. Finally I tried the newest version of classic simh… and was able to complete the SYSGEN.

Pretty cool blending two old technologies, I was involved with. I actually originally created the fake customer records using Python. Then wrote them to an AWS tape using Jay Moseley’s maketape. I also read and sorted them in TK4- (MVS) so I know they’re a valid representation of MVS Customer records.

When we outgrew the PDP-11/70 we moved to VSE/VM on IBM hardware, so I’m very familiar (at least I was at one time) with that side also.

In hind-site it has been a very satisfying exercise. I’m glad I had already worked with (and saved some data) AWS tapes in Hercules/MVS. It saved me a lot of time.