IBM COBOL program fix

Fixed sort04.cob amounts and arithmetic on those fields after figuring out how IBM COBOL works with these fields. It was working but not displaying amount fields and I had left it that way until I understood why. By working I mean producing output and running to completion. So I guess I should really say it wasn’t working properly. Should have created data with proper amounts. Processing would have been easier by not including decimal in data so 01095 instead of 010.95. But it’s been many years since working with IBM COBOL. I think it wasn’t a problem with gnuCOBOL since this was a port of that source!

COBOL numeric fields

I mentioned here something odd and confusing to me. So played with it and certainly can work around it. However I still find it strange that in IBM COBOL, at least this very old version, I can’t move a field defined as 999.99 to another field defined as 999.99. I guess the answer simply is that’s the rule. This is a very old compiler, so as far as I know it may not even work this way any more.

IMSAI 8080

Got the IMSAI 8080 emulator working. The computer came out in 1975 and was a clone of the MITS Altair 8800 that came out prior. My log/blog 1st entry shows the Jan. 1975 Popular Electronics cover with the Altair. They labeled it the 1st minicomputer kit because the term microcomputer hadn’t yet been coined. It predates the Apple & TRS-80. Microsoft was created by Bill Gates and Paul Allen and who sold their Altair Basic to MITS, their first customer. The IMSAI 8080 was also Matthew Broderick’s computer in the 1983 movie WarGames in which the question was asked…Do you want to play a game? And he almost set off Thermonuclear War. Very cool how you can toggle the switches and spin the screen replica in 3-D. Booted CP/M 1.3. Basically it looks like the YouTube demo, from the creator Udo Munk. I created a very short video that doesn’t really add anything to what’s already out there but it’s larger than many and the picture becomes very clear after 20 seconds. More info about the emulator here.

Backup NextCloud server

Used rsync to backup my personal files on my NextCloud server. However it appears it just backed up everything again, because the file all timestamps were today. For as long as I have been using Linux, I should know how to use rsync better,. Did some research and think I found solution…maybe

rsync –update -raz –progress ‘/home/myfiles…/’ ‘/media/sdb1/’.

However it just ended (return to prompt), with no final summary that I’ve seen before?

More greenbar?

Even though I said this wasn’t a high priority, I did some more work on my greenbar program. Seems to do a pretty fair job. Not exactly an example of my finest programming skills. A lot of trial and error rather than properly understanding the process. I think I understood it better a few years ago when I 1st started playing with it. Anywho…I’m looking to capture more of the nostalgic feel rather than an exact precision duplication of a greenbar listing. I think I did a pretty fair job. Probably needs more tractor holes among many other things. Works on the Hercules local prt file prt00e.txt AND GnuCOBOL files, especially when compiled with GnuCOBOL’s xref switch…looks very IBMish!

Here’s a GnuCOBOL example printed on the famous orange bar paper, so popular in IBM computer shops, for the fall season! Just kidding…no such paper as far as I know : )

Python virtual environment

Used Python virtual environment for the 1st time. It seems that none of the documented way to do this was an exact fit for me…odd. Seemed like a good way to try out the new version of the reportlab PDF module and also add the PyPDF2 module to get rid of the first blank page. Seemed to work well once I figured out I had to run (in my virtual environment) my program like ‘python3 and not ./ (which ran the non virtual program).

Extract Jobs from Hercules local printer

It is so much easier to look at MVS Job output locally on Linux (taking into account the choices of tools and editors available) than on the TSO, 80 column 3270 terminal. If you specify MSGCLASS=A in your JCL your output gets sent to the Hercules local prt subdirectory. However Hercules just appends each output onto the end of the previous Job. So…I wrote a Python 3 program that reads the Hercules local prt00e.txt output on Linux which contains multiple jobs and splits each job out to it’s own file. There are more sophisticated ways of doing this on MS-Windows but I was unaware of anything that does this on Linux. One advantage my program has over the more sophisticated MS-Windows program is it can also be used for gnuCOBOL programs. It opens the print file, read-only and can run while Hercules is active. There is maybe a likelihood that there could be problems reading while Hercules is writing. So it’s probably best to run between Job execution.

Extracted files are named “JobName-JobNo (date&time).txt”

I had to add date & time because some Jobs with the same Job Name & Job Number appear multiple times. Such as the “MF1” job that runs on the TK4 system. It can be cancelled BTW! I usually do if I remember.

It’s fast too…
Read a 7+MB file with 80322 lines and wrote (extracted) 42 files (jobs) in less than a second.

parseJob Output

There’s a possibility that I might revisit some work I previously did creating the nostalgic greenbar look. I could combine it with or add a option to this program. It’s certainly not high on my to do list. See this post for an example or search for greenbar for other examples of work I did on this, which also show some bluebar. Still needs much work though!

Lost Ubuntu server password!

Needed to recover the admin password in Ubuntu server 18.04.3 LTS. I can’t remember a giant random password, and my password manager’s password file became corrupt. And I didn’t have correct server password on my phone’s password file. In the past you would use the recovery option in the Grub menu to drop to root where you could change your password. Does that work today? Of course not! Now when you select the option to drop to root it asks for…drum roll please…the password. Genius! After googling I found []…(instruction weren’t an exact match to my grub but close enough where I could accomplish it) now you edit the grub boot procedure to replace the text ‘ro maybe ubiquity’ (the 2nd to the last line) with ‘rw init=/bin/bash’

then boot…then it will drop to root where you can change your password. Of course this meant I needed to disconect video card and keyboard cables from primary computer, move server near said cables on top of my primary computer and connect to server because it’s headless. Then reverse the procedure when finished. Joy!

More Assembler

Got simple Assembler program to run. It did have a error ‘IEW1161 WARNING – NO ENTRY POINT RECEIVED’ that needs fixing. Sounds bad but it was a warning. And it did read my 50 test disk records and wrote all 50 to printer. I need to re-familiarize myself with addressability. Not a terrible beginning. Syntactically, if not logically correct source, JCL that assembles and runs an Assembler program. In short…something I can work with.