Installing gnuCOBOL on Windows

7 years ago I did some testing with Open COBOL. I wanted to see how well it implemented COBOL and do some performance testing as well. As I recall, the implementation was lacking a bit, but I was still able to write some decent performance testing code.

I’ve been looking into COBOL again, just for fun, and decided to review the current state of the compiler. I would also like to do some performance testing and see if / how it integrates with SQLITE.

Just to make my life easier, I want to start with a Windows installation of gnuCOBOL though I may decide Linux is a better choice for my testing. So this post records my installation of the compiler.

Open COBOL is now gnuCOBOL

I didn’t look into the reasoning (legal I presume), but Open COBOL has become gnuCOBOL. From this point forward, any reference I make to COBOL is gnuCOBOL.

Locating the Compiler

See Jun 2020 update at the end of this post for a better location for Windows binaries.

gnuCOBOL is located on sourceForge.net. But I found that the default download for windows, like Linux, does not include a binary of the compiler.

Compiling projects on Linux isn’t tyically too bad, but Windows is a whole other beast. I just want a binary, I don’t want to have to build the compiler for Windows and deal with the whole Window/Linux/minGW compilation mess.

What I discovered is if you go to nightly_snapshots, there is a windows binary for gnuCOBOL 3.1.

In case that binary goes away, I have put a copy here BUT it will be as of this writing so use nightly_snapshots if you have a choice.

Note that this compilation does not include indexed file support.

Installing the Compiler

  • Unzip the distribution file. I unzip into c:\gnuCOBOL and my examples will assume that location.
  • In c:\gnuCOBOL\bin you will find various EXE files particularly cobc.exe and cobcrun.exe:

  • In System Properties | Environment Variable you need to add the path c:\gnucobol\bin:

  • In CMD at C:\, cobc.exe should work:
C:\>cobc -V
cobc (GnuCOBOL) 3.1-dev.0
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built May 05 2020 16:26:39
Packaged May 05 2020 15:48:49 UTC
C version (MinGW) "5.3.0"

C:\>

Setting Up a BAT File

There are parameters you’ve got to pass to the compiler every time. It is easiest just to have a bat file. I’ll call mine COBOL.BAT and simply put it into c:\gnucobol\bin.

C:\gnuCOBOL\bin>type cobol.bat
@echo off

rem Compile a COBOL program

rem are env strings already defined? (tried using () here, but it failed so goto it is

if NOT "%COB_MAIN_DIR%" == "" goto cont

rem define env strings

set COB_MAIN_DIR=c:\gnucobol\
set COB_CONFIG_DIR=%COB_MAIN_DIR%config
set COB_COPY_DIR=%COB_MAIN_DIR%copy
set COB_CFLAGS=-I"%COB_MAIN_DIR%include" %COB_CFLAGS%
set COB_LDFLAGS=-L"%COB_MAIN_DIR%lib" %COB_LDFLAGS%
set COB_LIBRARY_PATH=%COB_MAIN_DIR%extras
set PATH=%COB_MAIN_DIR%bin;%PATH%
	
:cont

rem Start the compiler

cobc -x %*

-x indicates the output from the compiler should be an EXE file.

If you want to use the cobc command directly, simply use “cobol -V” once to set up the environment, then cobc can be used directly.

Testing

In c:\gnuCOBOL, you will find gnuCOBOL.pdf, a very comprehensive manual of the compiler.

If you want to do a hello world test, here is the code:

C:\gnuCOBOL>type hellow.cob
        id division.
        program-id. hellow.
        procedure division.
            display 'hello world!'.

Note there are 8 leading spaces on every line and another 4 for the DISPLAY verb. This is how fixed format COBOL code must be written.

Here is the compile and subsequent execution. Note that I use the -t- option during the compile. This will create a compiler output listing.

C:\gnuCOBOL>cobol -t- hellow.cob
GnuCOBOL 3.1-dev.0 hellow.cob Tue May 05 13:57:13 2020 Page 0001

LINE   PG/LN A...B............................................................

000001       id division.
000002       program-id. hellow.
000003       procedure division.
000004           display 'hello world!'.


0 warnings in compilation group
0 errors in compilation group

C:\gnuCOBOL>hellow
hello world!

Learning COBOL

If you have stumbled across this post because you want to learn COBOL here are a few resources I can give you (and I’ll try to keep this updated when I find others).

The gnuCOBOL manual is very extensive, especially for free software, but most of the time it is pretty terse.

I have found the Unisys manual to be quite well written and it goes into much more detail about the language. Granted gnuCOBOL and Unisys COBOL aren’t exactly the same, but that will probably not be much of a problem. Usually vendor manuals are pretty good about pointing out non-standard extensions.

I am towards the end of taking this udemy.com course:

https://www.udemy.com/course/mainframe-the-complete-cobol-course-from-beginner-to-expert/

This is an IBM mainframe-based course. But COBOL is COBOL. All COBOL code shown will work the exact same way in gnuCOBOL.

The list price is $175, I paid $10. For $10 it is a decent course. I would not have been very happy had I paid $175. But I get more from books than videos.

There are several books I used during my career that are, as far as I’m concerned, essential in writing production COBOL code.

The first is The Programmer’s ANSI COBOL Reference Manual, 2nd Edition by Donald A. Sordillo. This book is, of course, out of print and fairly expensive. It is $250-$800 on Amazon and no listing on ebay today. But if you want to code in COBOL, keep watching for this book at a reasonable price. It is the best I ever saw.

My college textbook (yes, I took COBOL in college), is Fundamentals of Structured COBOL Programming by Carl Feingold. You can probably find this for < $20 if you are patient. It only covers the 1974 standard, but as a college level text book it has a very thorough coverage of the language.

Update: I have the 3rd Edition of Fundamentals of Structured Programming. After writing these blog posts for GnuCOBOL I came across the 4th edition for a reasonable price (~ $15) and bought it to compare. The newer edition is bigger in all 3 dimensions. I examined the Report Writer chapters in both books. The newer edition was easier to understand and the page layout was easier to read as well. Still, it only covers COBOL’74.

When I wrote the COBOL standards for the companies I worked for, I used Handbook of COBOL Techniques (Computer Partners, Inc) and COBOL with Style (Louse J. Chmura). These are great books for producing clean code that others can read.

June 2020 Update

The gnuCOBOL binary available from Source Forge doesn’t include ISAM support and for experimentation I really would like ISAM.

I messed around with building my own compiler which was successful, but it took days of messing around. Then I stumbled on Arnold Trembley’s website. He has exact instructions for building the compiler as you want it. More importantly, he keeps various flavors of the recent release available in binary form.

From his website I was able to download

GnuCOBOL 3.1-dev r3577 (16MAY2020) MinGW compiler for Windows XP/7/8/10 with COBOL ReportWriter. Includes VBISAM 2.0.1 for Indexed Sequential file access support, GMP 6.2.0, and PDCurses 4.1.0 (17.0 megabytes). Rename .7z to .exe for self-extracting archive.

Extracted this to c:\gnuCOBOL and it works perfectly, well on a hello world test anyway.

Posted in c-gnuCOBOL | Tagged | 10 Comments

Cleaning out Your Quicken Data File: Deleting all Historical Transactions, Securities, and Accounts

[Note: please DO NOT ask me questions about this procedure. I did it twice myself and never expect to do it again. I will not remember any details and will not be able to provide any more help that what is described within this procedure. ]

This procedure was done using Quicken 2020. The exact sequence of buttons may change in the future.

My Quicken Data file is filled with decades of old data, long forgotten closed accounts, and stock transactions from now non-existent companies (like MP3.COM!).

If I’m going to migrate my current data to gnuCash, I’m sure I need to get rid of as much history as possible to make the migration less of a headache.

I spent several very long sessions figuring out how to remove all of this history. The old securities were particularly a problem. The process is complicated enough I decided to document it here in case any one else decides they need to do the same.

You need to backup your live data and work on a copy. Chances are you will need to go thru the process several times until you figure out exactly what works for you. As I was going thru the process, I would check point my progress by exiting quicken and copying the data file. Then if I screwed something up, I only had to return to the prior checkpoint or worst case a few checkpoints back.

Deleting Old Accounts

  • As already mentioned, copy your live quicken file and work on a copy of the live data. Once you are done you will have a file to import into gnuCash and still have your live data file so you can continue to use quicken, even if just for historical data.
  • Do a screen capture of quicken’s left panel that shows the balances of all of your accounts and your net worth. Once you are done, you will want to verify these all still match.
  • With your copy of the quicken file open, Select File | File Operations | Validate and Repair. In the dialog box, select validate file and click on OK. Depending on your data file size, this can take a while. About 5 minutes for me.
  • Open the Account List (ctl-A). Select ‘Show Hidden Accounts’ box. All of my old unused (zero balance) accounts get listed this way. I don’t think I have ever deleted an account so I have a bunch of them.
  • The next step is to reconcile all of these hidden accounts with a Zero balance. The year-end process will not delete old transactions unless they are reconciled.
  • I start at the top of the account list, open each old account, reconcile it (ctl-R) using a zero ending balance.
    • Closed Brokerage accounts  should be reconciled in the same manner.
    • For Asset(Property) and Liability accounts, you cannot do a ctl-R reconcile. Instead:
      • Select the transactions you want to ‘delete’ in year-end
      • Edit | Transaction | Reconcile State | Reconciled to mark them reconciled.
    • You may have other non-hidden accounts that you want to reconcile. For example I have a CASH, AR, and AP account that are catchalls and have decades of transactions that really aren’t important to me.
    • I’ve had a couple of cases where reconciling an Asset account has messed up another account total. I had to run transaction registers of before and after to find the screwed up transactions and fix them. I suspect the problem was due to some corruption in the data file.
  • You are ready to run Year End (YE) which will delete all transactions OLDER than a date you specify.
    • YE will not delete unreconciled transactions.
    • YE will not delete any transactions dealing with a security.
    • To start the YE, File | File Operations | Year-End Copy
      • Select I only want transactions in my current data file …
      • Typically this would be Jan 1 of the year for which you want to keep in your new quicken data file.
      • Click OK. This takes a fair amount of time.
    • Review the YE:
      • One irritating issue I’ve found – if windows file explorer has your quicken data file selected, quicken will fail the YE w/o any indication of an error. If nothing appears to have been deleted, check for that.
      • Your account balances should match what you had at the start.
      • Examine each account. In general, they will start on the specified date. If you have transactions dealing with securities or transactions to an asset/liability that you didn’t reconcile then those will still show. Generally that is fine.
  • At this point I do another File | File Operations | Validate and Repair and check the validate box just to be sure something horrible hasn’t happened to the data. Check those account balances!
  • Finally, you can delete old accounts!
    • ctrl-a to bring up accounts list. Check Show hidden accounts.
    • To delete an account from the list, click on the edit button, click on delete account button, Verify it is the right account, type in Yes, click OK.
    • Repeat until they are all gone!
    • Delete Old brokerage accounts if there are no open securities in them.
    • At this point, I no longer have any hidden accounts and my account balances are all still correct.

Deleting Old Securities

Deleting old securities is even messier than deleting accounts and transactions. Unless you’ve got many, you are probably best off not doing this. But here is how.

  • You should still have a screen capture of your account balances.
  • Take a screen capture of your open securities
  • Create a new ‘TEMP’ brokerage account to hold open securities
    • Tools | Add Account | Brokerage | Use Advanced Setup | I want to enter xactions manually
    • Click on Next, use ‘TEMP’ as account name, click on next, click on next again, click on next again, Yes for no securities entered, and finally click on Done.
    • Select No for single mutual fund account and click next then click finish.
  • Move Open positions (securities) to the TEMP brokerage account:
    • Select the brokerage account containing the securities to move
    • Click the settings gear icon at the upper far right
    • Click on Move transactions
    • In the Move Investment transactions window click on the Select Open Positions button.
    • In Move To Account box, select the new TEMP account.
    • Click on the Move Button, then click on the Done button.
  • Archive Closed positions to Archive account:
    • Select the brokerage account containing the securities to move
    • Clicke the settings gear icon at the upper far right
    • Click on Archive Transactions
    • Click on Yes, click on Backup
    • All old transactions are in a new account named <brokerageAcctName>-Archive
  • Delete this newly created Archive account. Verify net worth is still correct.
  • Now you can deleting old transactions in the brokerage account linked checking account that matched those old securities.
    • Open the brokerage account linked checking account
    • Sort on Category
    • Locate and then select all transactions with a category of [Unspecified Account]
    • ctl-D to delete the transactions
    • Your Net Worth will now be wrong and the brokerage checking account will be the culprit. That’s OK for the now.
  • Move open positions from TEMP account back to brokerage account:
    • Open the TEMP brokerage account
    • Click the settings gear icon at the upper far right
    • Click on Move transactions
    • In the Move Investment transactions window click on the Select All button.
    • In Move To Account box, select the brokerage account
    • Click on the Move Button, then click on the Done button.
    • Delete the TEMP account
  • Correcting the Brokerage Linked Checking Account Balance
    • Open the Checking Account
    • Verify the transactions are sorted by date
    • Go to the top of the transaction list (oldest) where you will find a Beginning Balance transaction.
    • The beginning balance will probably contain some crazy big negative number. Change it to zero.
    • Examine the current balance for this account.
    • Enter a new beginning balance (in the DEPOSIT field) that is <correctBalance> – <currentBalance>
  • Now, the checking account balance should be correct as well as the Net Worth
  • Open Positions should match up with what they were before.
  • Delete Old Securities (Finally!!):
    • ctl-Y will bring up the securities list
    • Each security that is closed and contains no transactions will have a DELETE button available at the far right of the security’s line.
    • Scroll down the list, deleting each of the securities that can be deleted.
  • Final Check
    • All account balances and net worth match the original values.
    • Run Validate one more time

Extra Credit

I had one special case security that took some extra thought.

Like most (I assume) brokerage accounts, mine has a money market (MM) account that money sweeps into and out of automatically (at least in the early days) and there is the obligatory $0.02 cents of interest each month. After a couple of decades this amounted to a lot of transactions.

The brokerage account had stopped using that account several years ago (the balance was moved to another MM account) and it was essentially a closed security EXCEPT they had decided to start using it again just last month. A balance was moved back to that account and it had one month of interest.

I really wanted to get rid of all of those historical transactions and just keep the 2 recent ones.

To do this, before starting the Deleting Securities procedure, I created a new transaction against that MM security that SOLD all of the shares for $0, effectively closing that position.

After moving all positions from the brokerage account (and before deleleting the archive account), I moved JUST the 2 recent transactions from the archive account back into the brokerage account.

That completes my process for getting rid of all historical transactions, securities, and accounts in the quicken data file. I now have a clean quicken data file I can use for experiments on importing data into gnuCash.

Posted in c-gnuCash | Tagged , | 2 Comments

HP3000/XL Series 918 Startup and Shutdown Procedures

Quick video to remind me the proper way to start / stop my HP3000 – a procedure I do very infrequently.

Posted in c-retro | Tagged | Leave a comment

Can Canned Fuel (Sterno) Boil Water?

Short answer: Yes, but slowly.

I have a small electric inductive burner I can run from my generator and a similar propane burner with a converter that allows it to run from either small green propane tanks or a larger 5G style tank.

I’m not consistent at keeping fuel supplies available for either of these cooking methods, though. So I considered getting a canned fuel stove and a supply of canned fuel I can keep stored.

I have a bucket of emergency food, but much of that food relies on having access to boiling water. So my question is: can canned fuel boil water?

Reviews and Q&A on Amazon seem to be mixed and nothing on the Sterno site (that I found) indicates it does or does not. So it is time to setup an experiment.

Full disclosure: this is not a highly accurate experiment, but it should give me a yea/nay on whether I want to rely on canned fuel.

My setup is straight forward: a stove, canned fuel, and a fairly accurate thermometer.

I used Sterno canned heat for fuel:

The cook stove is from Coghlan’s:

A cuisinart sauce pan:

and an exectech multimeter with temperature sensor:

First question: how hot is the flame? In general I was seeing 330F. It would sometimes go as high as 650F, but just briefly.

I tried 3 different experiments:

  • Heat 1 cup Uncovered
  • Heat 1 cup Covered
  • Heat 2 cups Covered

Here is a table of each experiment showing the temperature of the water as time passed:

In summary, you must cover the pan or the water will never boil. Even then it is pretty slow to get boiling.

To bring 2 cups of water to boil consumes 1/2 the 2.6 oz can of fuel. To add food to the water, get it back to boiling, and cook would certainly go thru the whole can and take roughly the full 45 minutes the can would last.

This is a little to slow for my taste, so I’ll stick to propane though I might buy a box of fuel just to use for heating (rather than boiling) food.

Feb 2020 Update:

I purchased a propane stove like this ($37 at local sporting goods store):

Then did the 2 cup water test using this setup:

I set the burner 2 notches back from high (high just seemed to me like too much heat was being wasted). It took 3 minutes, 40 seconds to heat 2 cups in this scenario.

I haven’t been keen on using 1lb propane bottles as possible emergency fuel as I don’t want to keep a decent quantity of tanks stored anywhere. But I do have 3 5G propane tanks I use in the BBQ, deck heater, and spare.

I found I can just keep a few 1lb propane bottle and refill them with this:

Instructions can be found easily on the web. It’s not the safest thing to do I imagine, but would do in a pinch.

Posted in c-Misc | Tagged , | 2 Comments

Windows Update Blocker, WUG

One of my biggest issues with Windows 10 is the fact that it updates itself whenever the heck it wants. Yes, there is some control, but not enough. I have multiple Win10 systems that are left off for months and when I turn them on, they immediately start updating (downloading) when all I want to do is run a quick test, and just turn it back off.

With all prior versions of Windows, I turn off auto updates, then do a periodic update on all systems simultaneously. I may blow a whole morning doing so, but it is on my own schedule.

I recently found Windows Update Blocker or WUG. It turns auto updating off allowing me to do the updating on the same cycle I update all of my other machines.

I’ve installed it into a test system and I’m watching it. That system had been off for months and it’s not updating, so I it looks like WUB works as advertised.

WUB 1.5 can be found here:

https://www.sordum.org/9470/windows-update-blocker-v1-5/

 

Posted in c-pcos | Tagged , | Leave a comment

Watch Dog Timer (WDT) for ESP8266

While messing with an ESP8266 for the past couple of days, I decided I should look into how the watch dog timer operates.

Turns out the WDT is enabled automatically for the ESP8266. Most of the library routines reset it so you may never even know it is running unless your program hangs in a loop.

Resources

My primary resource for researching ESP8266 WDT was:

ESP8266: Watchdog functions

Hardware and Software Timers

There is a hardware WDT and a software WDT. The HW WDT is always running and will reset the MCU after about 6 seconds if the HW WDT timer is not reset.

The SW WDT seems to reset the MCU at 1.5 about seconds. You can enable/disable the SW WDT, but not the HW WDT. There seems to be little point in disabling the SW WDT as you must reset it to also reset the HW WDT.

Enabling the Software WDT

As previously mentioned, the SW WDT is running by default. If  you wish to disable it, the SW WDT is disabled with

ESP.wdtDisable();

The SW WDT is enabled with:

ESP.wdtEnable(msecs)

While you must pass a timeout value to wdtEnable, it is currently ignored.

Resetting, Kicking, Feeding the Dog

As mentioned before, most of the libraries will automatically reset the WDT for you so you should not have to do so. But if you are doing something compute bound that will take more than a second or so, you should manually reset the timer with

ESP.wdtFeed();

Summary

Unlike Teensy and Arduino, WDT is very easy to use. The downside is when the timer pops, the system just resets. You can’t jump to some code to handle the reset.

 

Posted in c-esp8266 | Tagged , , | 1 Comment

Raspberry PI (RPI) USB Drive Performance

Several years ago I put a USB hard drive on my development RPI using procedures like this:

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177

I knew it helped, but not really to what extent.

Today, I had to upgrade the RPI from Wheezy to Jessie to Stretch. My SD card based RPIs took 1 long day or two 8 hour days to do the update.

The development RPI running the USB hard drive was upgraded in 1/2 a day, if even that.  Clearly the USB system is much faster.

Posted in c-rpi | Leave a comment

Playing Old Interactive Fiction Games on the HP3000

(Note: as of Apr 2020, these games are available online. If you would rather play them online rather than install the SIMH emulator, see https://wp.me/p3PlCO-D3).

Last year I posted instructions on extracting and running the SIMH HP3000 emulation. I have found that many people downloading this file are doing so to run the Interactive Games on that system: WARP and MANSION.

I decided to make loading the games a little easier, and also got the ADVENTURE (Colossal Cave) game running as well as it was always my favorite.

Install the Software

First, download the zip file from:

https://drive.google.com/file/d/1-bVJwoXlVK5CG7eFpQ3-K24ajyTeoPu4/view?usp=sharing

Extract all files of hp3000Sim.zip into c:\hp3000Sim. Note: if you extract into a different directory you will need to fixup the hp.bat file.

Start the Emulator

In c:\hp3000Sim, double click on hp.bat file:

This will start the emulator, the HP3000 will boot up and quickly get you to the colon input prompt:

Playing the Games

To get to the games, you must logon as MGR.GAMES. Once you do this, a logon UDC will start a text-based menu system:

Now just type in the number assigned to the game and press ENTER to begin playing it.

For example, to start Adventure, type 1 followed by enter:

Tips

  • The HP3000 console allows only upper case input. As far as I know, none of these old games will have issues with upper case only. In fact, some have issues with lower case.
  • The HP3000 console doesn’t show a cursor thus back spacing can be difficult. Control-X will erase the entire line.
  • If uppercase only / no cursor troubles you, you can connect to the emulator (127.0.0.1) using port 1054.
  • Exit the menu by typing X followed by ENTER.
  • Exit the menu and logoff by typing EXIT followed by ENTER.
  • Don’t forget to SHUTDOWN – The HP3000 doesn’t like unexpected halts any more than Windows or Linux. Type Control-A to get the ‘=’ prompt, then type SHUTDOWN to shut the operating system down in an orderly fashion.
Posted in c-retro | Tagged , | 17 Comments

Woof Off! PCB Files

Göran Cronström graciously shared the PCB CAD files he made for the Woof Off! project.  He created both a SMD version and a PTH version. Awesome, and thanks Göran!

The SMD version is here:

http://www.xyfyx.com/files/WoofOffFabSMD.zip

While the PTH version is here:

http://www.xyfyx.com/files/WoofOffFabTHT.zip

Posted in c-electronics | Tagged , | 2 Comments

Upgrade HP3000 SIMH Disk Drive from HP7920 to HP7925

The virtual hard drive that came with SIMH is a 55MB HP7920 disk drive. With just the O/S installed, there isn’t a lot of space left on this drive. This HP3000 can also emulate a 120MB HP7925.

This procedure will step you through backing the HP3000 up, creating an HP7925, then restoring the files onto the new hard drive. I’ve wanted to do this 2 times now, so I will write down the process for posterity.

SYSDUMP

You need to copy the O/S and all the files to tape. This is done with the SYSDUMP command.

Earlier versions of SIMH hung trying to do a SYSDUMP. I obtained simh-4.0-current–2019-05-07-52a31597.zip and extracted the hp3000.exe from it.

:HELLO MANAGER.SYS

CPU=1. CONNECT=1. SUN, AUG 25, 1991, 4:11 PM
16:11/#S1/14/LOGOFF ON LDEV #20

16:11/#S2/15/LOGON FOR: MANAGER.SYS,PUB ON LDEV #20
HP3000 / MPE V E.01.00 (BASE E.01.00). SUN, AUG 25, 1991, 4:11 PM
:<<type control-E>>
Simulation stopped, P: 071144 (PAUS 0)
sim> attach ms0 sysdump-190825.tape
MS: creating new file
sim> go

16:11/10/Vol (unlabelled) mounted on LDEV# 7

:FILE T;DEV=7
:SYSDUMP *T

ANY CHANGES?
ENTER DUMP DATE? 0
ENTER DUMP FILE SUBSET(S) @.@.@
LIST FILES DUMPED? N
?16:12/#S2/16/IS "T" ON LDEV#7 (Y/N)?
<<type control-A to get "=" prompt>>
=REPLY 16,Y
STORE/RESTORE, VERSION 2 (C) 1981 HEWLETT-PACKARD CO.
SUN, AUG 25, 1991, 4:12 PM

LOADLIST.PUB .SYS NOT STORED:(S/R 55) FILE IN USE FOR WRITING
LOG0016 .PUB .SYS NOT STORED:(S/R 55) FILE IN USE FOR WRITING
SL .PUB .SYS NOT STORED:(S/R 55) FILE IN USE FOR WRITING

FILES STORED: 535
FILES NOT STORED: 3
**WARNING** FOLLOWING SYSTEM FILES NOT DUMPED
<<This is fine>>
HIOCTAP0.PUB.SYS
HIOCIPR0.PUB.SYS
IONRDR0.PUB.SYS

END OF SUBSYSTEM
:
<<type control-A to get "=" prompt>>
=SHUTDOWN

SESSION ABORTED BY SYSTEM MANAGEMENT
CPU=5. CONNECT=12. SUN, AUG 25, 1991, 4:22 PM
16:22/#S2/15/LOGOFF ON LDEV #20
16:22/1/ALL JOBS LOGGED OFF
SHUT

Programmed halt, CIR: 030377 (HALT 17), P: 161440 (BR P-1)
sim> exit

Create a SIM script file with the following contents. I will call this myreload.sim.

set -n console log=mpe-1-reload.log
set console DEL=177
set cpu idle=10
set ds0 7925,format
attach -n ds0 mpe.7925.disc
set ms0 7970E
attach -r ms0 sysdump-190825.tape
deposit SWCH 003006
load
assert 01.112247=046022
deposit 01.112247 021360

mpe.7225.disc will be the file containing the contents of the new HP7925 disk drive.

sysdump-190825.tape is the name of the tape file I just created above.

Now Start the HP using the new SIM script:

C:\hp3000Sim>hp3000 myreload.sim

HP 3000 simulator V4.0-0 Current        git commit id: 52a31597
Logging to file "mpe-1-reload.log"
C:/hp3000Sim/myreload.sim-5> attach -n ds0 mpe.7925.disc
DS: creating new file
C:/hp3000Sim/myreload.sim-7> attach -r ms0 sysdump-190825.tape
MS: unit is read only

Cold load complete, P: 177661 (LOAD Q-12)

The last step is to remove the HP7920 from the configuration, add the HP7925, and once that is done, the system will load the tape onto the new drive.

Type GO to start the system and follow the example:

sim> go
HP32002E.01.00
WHICH OPTION <COLDSTART/RELOAD/UPDATE>? RELOAD
WHICH OPTION <SPREAD/COMPACT/RESTORE/ACCOUNTS/NULL>? SPREAD
ANY CHANGES? Y
LOAD MAP?
MEMORY SIZE = 512.?
I/O CONFIGURATION CHANGES? Y
LIST I/O DEVICES?
HIGHEST DRT = 36.?
LOGICAL DEVICE #? 1
DRT #? 0
LOGICAL DEVICE #? 1
DRT #? 4
UNIT #? 0
SOFTWARE CHANNEL #? 0
TYPE? 0
SUB TYPE? 9
RECORD WIDTH? 128
OUTPUT DEVICE? 0
ACCEPT JOBS/SESSIONS?
ACCEPT DATA?
INTERACTIVE?
DUPLICATIVE?
ENABLE SEEKAHEAD?
INITIALLY SPOOLED?
DRIVER NAME? IOMDISC1
DEVICE CLASSES? DISC,SPOOL
IS DISC A SERIAL DISC CLASS? N
IS DISC A FOREIGN DISC CLASS?N
IS SPOOL A SERIAL DISC CLASS? N
IS SPOOL A FOREIGN DISC CLASS?N
LOGICAL DEVICE #?
MAX # OF OPEN SPOOLFILES = 20.?
LIST I/O DEVICES? Y
LOG DRT U  C T SUB               REC   OUTPUT  MODE   DRIVER   DEVICE
DEV  #  N  H Y TYPE  TERMINAL    WIDTH  DEV            NAME    CLASSES
 #      I  A P      TYPE SPEED
        T  N E
1   4   0  0 0  9                128    0             IOMDISC1 DISC
                                                               SPOOL
6   14  0  0 32 2                66     0          S  IOLPRT0  LP
7   6   0  0 24 0                128    0             IOTAPE0  TAPE
8   6   1  0 24 0                128    0             IOTAPE0  TAPE
9   6   2  0 24 0                128    0             IOTAPE0  TAPE
10  6   3  0 24 0                128  LP       JA     IOTAPE0  JOBTAPE
20  7   0  0 16 0    18   ??     40     20     JAID   IOTERM0  TERM
21  7   1  0 16 0    10   ??     40     21     JAID   IOTERM0  TERM
22  7   2  0 16 1    10   ??     40     22     JAID   IOTERM0  TERM
23  7   3  0 16 0    10   ??     40     23     JAID   IOTERM0  TERM
24  7   4  0 16 0    10   ??     40     24     JAID   IOTERM0  TERM
25  7   5  0 16 0    10   ??     40     25     JAID   IOTERM0  TERM
26  7   6  0 16 0    10   ??     40     26     JAID   IOTERM0  TERM
27  7   7  0 16 0    10   ??     40     27     JAID   IOTERM0  TERM
28  7   8  0 16 0    10   ??     40     28     JAID   IOTERM0  TERM
29  7   9  0 16 0    10   ??     40     29     JAID   IOTERM0  TERM
30  7   10 0 16 0    10   ??     40     30     JAID   IOTERM0  TERM
31  7   11 0 16 0    10   ??     40     31     JAID   IOTERM0  TERM
32  7   12 0 16 0    10   ??     40     32     JAID   IOTERM0  TERM
33  7   13 0 16 0    10   ??     40     33     JAID   IOTERM0  TERM
34  7   14 0 16 0    10   ??     40     34     JAID   IOTERM0  TERM
35  7   15 0 16 0    10   ??     40     35     JAID   IOTERM0  TERM
CLASS CHANGES?
LIST I/O DEVICES?
LIST ADDITIONAL DRIVERS?
I/O CONFIGURATION CHANGES?
DISC VOLUME CHANGES? Y
LIST VOLUME TABLE? Y
VOLUME # NAME LOG DEV #
1 MH7920U0 0
DELETE VOLUME? Y
ENTER VOLUME NAME? MH7920U0
ENTER VOLUME NAME?
LIST VOLUME TABLE?
NON-SYSTEM VOLUME ON LDEV 1
ADD TO SYSTEM VOLUME SET? Y
ENTER VOLUME NAME? MH7925U0
LOGICAL PACK SIZE IN CYLINDERS = 815.?
LIST DEFECTIVE TRACK/SECTOR INFORMATION?
DELETE TRACK?
LIST VOLUME TABLE? Y
VOLUME # NAME LOG DEV #
1 MH7925U0 1
LIST VIRTUAL MEMORY DEVICE ALLOCATION? Y
VOLUME NAME   LDEV #   VM ALLOCATION
  MH7925U0     1        0
ENTER VOLUME NAME , SIZE IN KILOSECTORS? MH7925U0,10
ENTER VOLUME NAME , SIZE IN KILOSECTORS?
VIRTUAL MEMORY CHANGES? Y
LIST VIRTUAL MEMORY DEVICE ALLOCATION? Y
VOLUME NAME   LDEV #   VM ALLOCATION
  MH7925U0     1        10
ENTER VOLUME NAME , SIZE IN KILOSECTORS?
VIRTUAL MEMORY CHANGES?
DISABLE LOGGING?
MAX # OF SPOOLFILE KILOSECTORS? =128?
# OF SECTORS PER SPOOLFILE EXTENT = 384.?
2 FILES NOT FOUND - ANOTHER TAPE SET AVAILABLE?N
NOT ALL FILES FOUND - LIST?
BANK 0 DEPENDENT MEMORY USED - 14004
<< make up any date < 1/1/2000 >>
DATE (M/D/Y)?6/12/91
TIME (H:M)?20:48
WED, JUN 12, 1991, 8:48 PM? (Y/N)Y
LOG FILE NUMBER 29 ON
*WELCOME*
:HELLO OPERATOR.SYS;HIPRI
20:48/13/SP#6/SPOOLED OUT
20:48/#S1/14/LOGON FOR: OPERATOR.SYS,OPERATOR ON LDEV #20

That’s it! On a real classic HP3000, that would have taken hours. I spent many a long night in my youth doing just that.

Just to check that everything is roughly correct:

:HELLO MANAGER.SYS
CPU=1. CONNECT=2. SAT, JUN 1, 1991, 8:49 PM
20:49/#S1/14/LOGOFF ON LDEV #20

20:49/#S2/15/LOGON FOR: MANAGER.SYS,PUB ON LDEV #20
HP3000 / MPE V E.01.00 (BASE E.01.00). SAT, JUN 1, 1991, 8:49 PM
:REPORT TMP.@
ACCOUNT       FILESPACE-SECTORS     CPU-SECONDS    CONNECT-MINUTES
   /GROUP       COUNT    LIMIT    COUNT    LIMIT    COUNT    LIMIT
GAMES            8902       **       20       **      410       **
   /TMP          4870       **        1       **        3       **
HPOFFICE            0       **        0       **        0       **
HPPL85              0       **        0       **        0       **
HPPL87              0       **        0       **        0       **
HPPL89           1140       **        0       **        0       **
HPPL96              0       **        0       **        0       **
ITF3000             0       **        0       **        0       **
SUPPORT         38073       **        0       **        0       **
SYS             39284       **       44       **     1016       **
   /TMP             0       **        0       **        0       **
TELESUP          1559       **        0       **        0       **
:

The last step is to fix the SIMH startup script to use the new hard drive. Most likely you are using the mpe-auto.sim. script. Edit it and change 7920 to 7925 everywhere:

; Set the disc mode and attach the disc image file.

set ds0 7925
attach -e ds0 mpe.7925.disc
Posted in c-retro | Tagged | Leave a comment