simh PDP-10 and TOPS-10

I know nothing about the PDP-10, except the little I’ve read recently. Usually when I think of DEC, I think mini-computer, but It’s a mainframe and used a 36-bit data word, that evidently has quite a history with early hackers, and one of the most influential computers in history. It was an important computer at MIT where they created ITS, the Incompatible Timesharing System to run on the PDP-6 and later the PDP-10.

Paul Allen (January 21, 1953 – October 15, 2018), of MicroSoft, who also founded the Living Computer Museum, apparently had a fondness for the PDP-10, and bought one for what later became the Museum. Bill Gates said “Paul Allen and I honed our early programming skills on a PDP-10 mainframe at Computer Center Corporation (CCC) while in high school”.

I’m getting interested in this because of the PiDP-10 user group, but I first heard of in on the PiDP-11 user group, and there’s still a lot of talk about it there!

Downloaded I assume, latest Open Simh. The extracted folders have a March 15, 2024 date on them (just a few weeks ago). Built pdp11 and pdp10, by make pdpnn the executables are created in /BIN.

bill@bill-MS-7B79:~/Downloads/Computers/Emulation/simh/OpenSimh/open-simh-simh-ffe537a/BIN$ pdp10

PDP-10 simulator V3.8-1
sim>

Downloaded tops10-1.4
Unzipped
Copied the pdp10 executable into the TOPS-10 directory
Then just pretty much followed the readme.txt

Created startPdp10.ini…

set dz 8b
set tim y2k
att rp0 dskb.dsk
att rp1 dskc.dsk
att lp20 printer.out
att -am dz 2020
boot rp

Below is my actual startup. Like I said I just followed the readme. But it’s a start…and it worked!

Tops-10 is an OS that ran on the PDP-10. It was first released in 1970.

Wikipedia has some good info on it including some commands.

bill@bill-MS-7B79:~/Downloads/Computers/Emulation/simh/PDP-10/tops10/tops10-1.4$ 
pdp10 startPdp10.ini 

PDP-10 simulator V3.8-1
Listening on port 2020 (socket 7)
Modem control activated
Auto disconnect activated
BOOT V3(47)

BOOT>
[Loading from DSKB:SYSTEM.EXE[1,4]]

VNW 10-14-99
Why reload: shced
OPR,PARITY,POWER,STATIC,HARDWARE
NXM,HALT,LOOP,HUNG
PM,CM,SA
NEW,SCHED
OTHER
/H for help
Why reload: sched
Date: 01-jan-2003
Time: 00:00:00

Startup option: quick
[Rebuilding the system search list from the HOMe blocks]

[Rebuilding the active swapping list from the HOMe blocks]

[Rebuilding the system dump list from the HOMe blocks]


VNW 00:00:18 CTY system 4097
Connected to Node (0) Line # 12
Welcome to TOPS-10 7.03
Steuben Technologies Distribution Revision 1.4
Installed software:
BASIC,COBOL(68 and 74), FORTRAN, ALGOL10A
,BLISS-36 V4.2, SORT, RMS, APLSFV2,KERMIT(K10MIT 3(136)), SED
DBMS V5A, IQL3A V30, Message System V11CK, HAUNT, ADVENT

Although the software is installed, not all of it is tested.
and some of it like DBMS and the message system needs to be set up.
refer to the software notebooks and the documents on the
distrobution tape extracted files for the products you need.
at pdp-10.trailing-edge.com

For more information,updates and to report bugs or make comments please
go to http://www.steubentech.com/~talon/pdp10
or email me at wschaub@steubentech.com

to login as a normal user type login public
to login as operator login as 1,2 password mcp
to run advent type r dsk:adv under the public account (42,42)

to remove this message login as 1,2 and delete sys:notice.txt

.LOGIN 1,2
.R OPSER
[OPRPAF Processing auto command file]
?OPRALF LOOKUP failure 0
*
[CCPWFD Waiting for file daemon to start]
%%TTY STOMPER - Starting
^C

.kjob
[LGTOUL Other users logged-in under [1,2]]
Job 2  User OPSER  [1,2]
Logged-off CTY  at  0:01:52  on  1-Jan-3
Runtime: 0:00:00, KCS:0, Connect time: 0:01:33
Disk Reads:196, Writes:2, Blocks saved:0
.login public
Job 2  VNW  CTY
00:02    1-Jan-3   Wednesday
Welcome to TOPS-10 7.03
Steuben Technologies Distribution Revision 1.4
Installed software:
BASIC,COBOL(68 and 74), FORTRAN, ALGOL10A
,BLISS-36 V4.2, SORT, RMS, APLSFV2,KERMIT(K10MIT 3(136)), SED
DBMS V5A, IQL3A V30, Message System V11CK, HAUNT, ADVENT

Although the software is installed, not all of it is tested.
and some of it like DBMS and the message system needs to be set up.
refer to the software notebooks and the documents on the
distrobution tape extracted files for the products you need.
at pdp-10.trailing-edge.com

For more information,updates and to report bugs or make comments please
go to http://www.steubentech.com/~talon/pdp10
or email me at wschaub@steubentech.com

to login as a normal user type login public
to login as operator login as 1,2 password mcp
to run advent type r dsk:adv under the public account (42,42)

to remove this message login as 1,2 and delete sys:notice.txt


.r haunt


 This is HAUNT. Version 4.6
 See NEWS for news.
 Have you played before?[yes]
*no

  
 Welcome novice.  You are playing on one of the world's largest production
 systems.  The purpose of this game is to find
 treasure in a haunted house and then escape from the house.
  
 The program will give descriptions of locations and accept
 commands to perform actions.
 Give it directives on what to do with simple 1-5 word commands
 Its knowledge of English is limited but imaginative.
 The directions are north, south, east, west,
 up and down.  Directions can be one letter (n,s,e,w,u,d).
 Forward, back, left and right also work.
 To string commands together use 'then'. (eg. west then s)
 It will describe things to you, and a phrase enclosed in '   ' 
 is something it hears.
  
 Special commands: INVEN tells you what you hold.
                   SCORE gives your current score. 
                   STOP ends the adventure.  
                   LOOK describes your current position.
                   NEWS describes new features.
  
 *******************************************************************
 You get 15 points for finding a treasure and 5 points for
 getting it to the lawn outside the house.  You get an extra
 bonus of 20 points for getting your body off the estate.
 The maximum number of points is 440
 Good luck, you'll need it.  Ask for help if you want.
 *******************************************************************
 Copyright (C) 1979, 1980, 1981, 1982 John Laird
 *******************************************************************
  
 On with the adventure!!!
  
  
  
  
  
  
  
  
  
  
 Along time ago, a young couple was picnicing near the woods
 on the outskirts of town.  They were celebrating the birth
 of their first child.  Unfortunately, a crazed moose inhabited that
 area and attacked them.   The child and husband were
 unharmed, but the wife was gored to death by the moose.
  
 After the funeral, the man bought the land where the incident occurred
 and constructed a large mansion: CHEZ MOOSE.  He filled it with
 the treasures of his family and claimed that his wife's
 soul was still in the area.  He vowed to remain in the
 mansion until he had returned her soul to human flesh.
 He tried to bridge the gap between life and death to reclaim her.
 Some say he was insane with grief, but others claimed that the madness was
 in his blood, and his wife's death brought it to the surface.
 After he entered the house, he never returned, and was declared dead 
 seven years later.  Several people have entered the mansion
 looking for him but none of them have ever returned.
 There were rumors that he and his wife now haunt the house.
  
 That would be the end of the story except that the house
 still stands and is filled with priceless treasures.
 The house and all its contents are willed to his only descendant.
 Oh yes, I forgot to tell you, the day the mother was killed,
 the child was stolen by Gypsies.
 The Will claims that only the descendant will know
 how to avoid going crazy and committing suicide
 while spending a night in the mansion.
 An obscure hereditary disease, Orkhisnoires sakioannes,
 is supposed to play some part in this.
  
 So if your heritage is in doubt, you may be the descendant that
 can claim the treasure in the mansion.
 Many people, claiming to be descendants have died trying...
  or at least never returned.
  
 The terms of the Will say you get to keep any treasure
 you get to the lawn, but of course you must also get off the premises alive.
 Because the house is haunted it must be destroyed, and nobody
 would be crazy enough to try and recover the rest of the treasure.
 If you do get out, the government has agreed to
 buy the land and destroy the house.
  
 If you are insane enough to try, your adventure starts at a bus stop.
 Remember, type STOP to end the adventure.
  
 We are at an intersection of two streets going n-s and e-w.
 There is a bus stop here.
 To the west a bus is pulling away from the next bus stop.
  
*stop

 The party's over.
 Your final score is 0
 The total possible is 440
 Hmm... I don't think you tried very hard.
..
.r aplsf

terminal..tty
HI!: PLEASE LET ME KNOW IF APL IS BROKEN
APL-10 DECSYSTEM-10 APLSF 2(435)
CTY)  0:05:17 WEDNESDAY  1-JAN103 PUBLIC [42,42]
CLEAR WS
      )END
 21 INCORRECT COMMAND
      )END
       ^
      )OFF
CTY)  0:06:29  1-JAN103
CONNECTED   0:01:12 CPU TIME   0:00:00
0 STATEMENTS 0 OPERATIONS
Job 2  User PUBLIC [42,42]
Logged-off CTY  at  0:06:28  on  1-Jan-3
Runtime: 0:00:00, KCS:3, Connect time: 0:03:50
Disk Reads:1914, Writes:14, Blocks saved:2800
.kjob

.login 1,2
Job 2  VNW  CTY
[LGNJSP Other jobs same PPN]
[LGNLAS Last access to [1,2] succeeded on 14-Aug-7:17:33:28]
00:07    1-Jan-3   Wednesday

.r opr

OPR>
 0:00:35 	-- Begin auto take file --
		File: SYS:SYSTEM.CMD[3,3]

 0:00:35 	-- End auto take file --
		8 lines processed

 0:00:35 	  -- [SYSTEM]CATALOG error --
		Input error reading DSKB:MTALST.SYS[1,4]; End of file

 0:00:35 	  -- [SYSTEM]CATALOG error --
		Input error reading DSKB:DTALST.SYS[1,4]; End of file

 0:00:35 	Batch-Stream 0  -- Started --

 0:00:35 	Batch-Stream 1  -- Started --

 0:00:35 	Batch-Stream 2  -- Started --

 0:00:36 	Printer 0  -- Started --
OPR>
OPR>set ksys +0:01
OPR>
 0:10:58 	  -- Event KSYS queued, request #10 --
OPR>
;;SYSTEM: - Timesharing ends in 1 min at  1-Jan-3  0:12:00

 0:10:59 	  -- Timesharing is over --

 0:10:59 	  -- KSYS processing completed --
OPR>
;;SYSTEM: - Timesharing is over!

OPR>exit

.kjob
[LGTOUL Other users logged-in under [1,2]]
Job 2  User OPERATOR [1,2]
Logged-off CTY  at  0:12:28  on  1-Jan-3
Runtime: 0:00:00, KCS:0, Connect time: 0:05:12
Disk Reads:239, Writes:1, Blocks saved:0
.
.<Ctrl-E>
Simulation stopped, PC: 000001 (SOJG 6,1)
sim> set fe stop
sim> go
BOOT> <Ctrl-E>
Simulation stopped, PC: 706227 (SOJGE 2,706226)
sim> exit
Goodbye
bill@bill-MS-7B79:~/Downloads/Computers/Emulation/simh/PDP-10/tops10/tops10-1.4$ 

Made an old YouTube video public

For some reason a old YouTube video “Create stand alone executable COBOL programs using private Partition Data Sets on MVS in Hercules!”, I created/uploaded a few years ago (7/8/2021) was private. I think it’s useful, because most of the video I see about running programs on MVS, include the cycle of compiling/running… every time. However that would not be common in a production environment. Normally the programmers may do the whole cycle every time, in test PDS’s. But after they are satisfied that the program works as it should, the executable would be promoted to the production libraries. And production job-streams would just run the executable!

Recreate my TK5

OK, maybe I’m better off than I thought. I just installed the complete TK5 update 2. After running grep to look for WHB001 (my personal DASD), I found a copy in directory mvs-tk5-old. So I copied it from there to my new current mvs-tk5/dasd/. Also, saw WRK142.142 (I don’t think I’m using it in TK5) in my current TK4. And I also copied the extra dasd from the old tk5.conf to the new one. I saw some WHB PDS’s on the new volume!

I haven’t done anything with it for a while… and I get rusty. It had been so long that x3270 wasn’t even in my bash history.

Then I zipped it all up AND copied to my USB drive.

TK5 – I did something really stupid

Went to apply update 2. So like always, I wanted to backup first. And by backup I mean zip the whole current directory with my DASD. But I saw there was already a backup. So I renamed the old backup. But then I forgot to do a new backup, and I applied update 2. How stupid! Then, I followed the instructions below, which were confusing. Because the cleanup step, I’m told to do, isn’t in mvs-tk5 but in mvstk5-update2 which I wasn’t told to change to. Anyway it is obvious I needed to so I did. But finally it says…”After IPL”. IPL from where? Where I am currently… within mvstk5-update2 directory? Because there are startup commands in there. But if this is an update in place then run as usual, That’s not where I would start MVS. I start it in the main directory… one directory back, by typing ./mvs, and there’s not even a mvs start command in this update directory. In addition I don’t see my DASD in the dasd directory. So I probably lost my DASD. Which is really my fault. For forgetting to do the backup in the first place. So my first line of restoration failed. So I also always backup important files/directories on my personal USB drive… and apparently I didn’t do that either. Son-of-a mother!

  • Download Update 2 in the mvs-tk5 directory;
  • Unzip mvstk5-update2.zip in place. Replace the files if asked;
  • For Linux users: go to directory mvs-tk5 and execute a chmod -R +x * command.
  • Run script cleanup.bat for Windows or cleanup for Linux.
  • After IPL of the updated system, run the job update.txt. Submit this job with devinit 00c update.txt

Anyway at this point it just makes sense to start from scratch an install TK5 with Update 2. Luckly I keep my MVS jobs locally on Linux, so I can recreate the DASD and move/run my jobs there. But a lot of unnecessary extra work, because of not backing up first!

GnuCOBOL state control break works

Baring a few small errors. So it reads one million customer records and creates a customer amount total by state. Some small errors. Here’s a few lines from the report.

I wrote a quick Python program to count states that I hard coded and can confirm that the customer counts match. I checked a few random states AK (the 1st state), AS (Not a valid US state but evidently in my zip code data base) so I may want to exclude non US states, and WY (the last state on the report).

Even though AS isn’t a valid state it would be easy to add up the amount fields for 20 records. The first record is obviously wrong and all those 20’s are probably ASCII spaces.

                    Customer Report (Sort: STATE, CITY)

                                               State      Customers                           Totals


                                                          2,020,202                     $2,020,202.02

                                                  AK          6,318                       $316,541.84

                                                  AL         19,935                     $1,006,592.05

                                                  AR         16,960                       $859,531.86

                                                  AS             20                         $1,076.16

                                                  AZ         12,628                       $639,201.20

                                                  CA         62,721                     $3,152,291.71

                                                  CO         15,792                       $797,474.28

                                                  CT         10,367                       $522,221.12

                                                  DC          6,401                       $325,323.06

                                                  DE          2,403                       $122,121.97

                                                  FL         35,138                     $1,774,823.82

                                                  GA         23,163                     $1,181,057.34

                                                  HI          3,479                       $175,622.14

                                                  IA         24,931                     $1,257,559.19

                                                  ID          7,727                       $385,406.22

                                                  IL         37,564                     $1,895,855.56

I’m marveling how fast the COBOL program runs. But even my simple Python program is fast, of course it’s not also sorting. Here I ran it to count CA. You can see the total matches the report and even this program, processed the file in less than half a second.

(env) bill@bill-MS-7B79:python readCust.py"
62721 state matches
1000000 lines read

real    0m0.373s
user    0m0.350s
sys     0m0.024s
(env) bill@bill-MS-7B79:~/MyStuff/COBOL/progs/Sort06$

The tools available today are amazing. Back in school, I was punching out COBOL programs on cards.

Report Writer error.

OK, the working MVS version (see below) was a better starting point. I’m getting a single error.

000132             05  AMT-BR COLUMN 95 PIC $$$,$$$,$$9.99 SUM AMT-SAL.
error: 'AMT-SAL' is not defined
000133          01  TYPE CF SALESMAN-NUMBER LINE PLUS 1.
000134             05  LINE NUMBER IS PLUS 1.
000135                 10  AMT-SAL COLUMN 79 PIC $$$,$$9.99 SUM AMOUNT.
000136          01 TYPE CONTROL FOOTING FINAL LINE PLUS 2.
000137             05 COLUMN 86 PIC X(05) VALUE 'TOTAL'.
000138             05 COLUMN 95 PIC $$$,$$$,$$9.99 SUM AMT-BR.

However, as you can see, it is defined at the very next section below it.

I double checked my run-book that has that program, from 1977.

There are similar statements that were not flagged

I really hoped it would work because I don’t have much of a desire to dive back into the Report Writer. But this may be useful… if I do.