Recently I’ve gotten a hold of an old IBM mid-range computer, an AS/400 150.
This is an 1997 server very much aimed at businesses, pay-rolling, inventory management and such. It can be used as a multi user system, with users logging in via a terminal.
The operating system it runs is OS/400 and that is also the only OS it can run, no Linux available for this system.
Of course it comes with all the fun programming languages like COBOL and RPG, all the business classics :)
It’s compatible with the IBM system/36, so any programs made for an 80’s S/36 machine run without problems on the AS/400 machines. It also looks very much 90s, though I personally like the cover at the back, hiding all ports.
The one I picked up for cheap used to belong to an IT company that went bankrupt. It was cheap, the current owner had no idea what it was or if it worked and it’s strange IBM stuff. Seemed like a fun challenge to get running.
The potential problem with AS/400 machines, and other IBM machines is that business using it generally have a service contract with IBM for maintenance, meaning that an OS reinstall, password reset or such is done by IBM certified technicians, same for replacement parts.
Meaning that any broken HDD’s, non booting OS et cetera means I bought a nice paperweight.
Booting the AS/400
The model I got comes in a nice tower case. On the front there is a CD drive, tape drive and a small screen with a few buttons. When the start button is pressed, the machine goes through a number of checks, displaying it’s status on the screen.
IBM still has a handy list with codes, for example, C6004C60 means the database initialization is at pass 3. All very handy.
After I pressed the start button, I got plenty of time to look at this screen and enjoy the 90’s HDD sounds as this machine takes nearly 30 minutes to fully boot. After it’s done with all the status codes, it displayed 01 B N, which stands for Boot Normal.
Alright, it booted, but how to connect to it. As it’s a server, there is no video output. It can be connected to an IBM 5250 terminal, which I sadly don’t have laying around, or to the network.
Connecting it to the network didn’t do much, no new entry in the DHCP server of my router, so it most likely has an static IP.
Luckily, Wireshark exists, after plugging the AS/400 directly in my laptop, rebooting it and logging all traffic on my laptop’s Ethernet port, the following popped up
Bingo, 10.10.10.9, an IP address. Let’s see if we can connect directly with that. To do so, a 5250 terminal emulator like tn5250j or tn5250 is needed.
Connecting quickly gave me a nice green IBM screen
And yes, that is in dutch. Someone decided to get OS/400 in dutch…
Well, can’t have it all, if anyone has any idea how to get this in English, I’m all ears.
But, a login screen, great start. Now figure out how to login. Luckily OS/400 nicely says so when a user exists but the password is wrong.
First try, BIZIBIT/BIZIBIT. User exists, password wrong. A few more tries with common passwords and no luck. ROOT/ROOT, same story.
But the ADMIN user exist, it won’t be ADMIN/ADMIN right, that’s too simple
Well, that was easy.
What can you do with it?
Well, run businesses mostly. There are no games, no leisure programs, only business. Just how IBM likes it I guess.
First thing to do is explore OS/400 a bit, as it’s a very different operating system then things like Linux or Windows from that era.
To start with, OS/400 is Object based, everything is an object. Not a folder, not a file, an object.
An object basically contains of 2 things, a description what it is and the actual object.
The description explains what the object is, a text file, a library, a program and so on and what OS/400 can do with it.
Libraries contain other objects, but never other libraries. As an example, the library QSYS contains OS/400 related objects, it’s kind of the “Program files” of OS/400
All in all, a strange operating system and interesting to have a look through.
So what to do, let’s start with a “hello world” program, in RPG.
First I made a new library called mylib using the CRTLIB command, in which I added a few objects.
CRTSRCPF file(mylib/qrpglesrc) test(‘RPG sources’)
CRTSRCPF file(mylib/qrexxsrc) test(‘REXX sources’)
These are both files, one for RPG source code and one for REXX source code.
In these files, members are stored, each member contains the code. So a file is an object that contains source code or data for programs. Perfectly logical right? :)
After that, the PDM, Program Development Manager must be started using the STRPDM command and it’s time to add source code, finally.
I never written RPG before, so time to find some code online.
And yeah, RPG is weird, it dates back to punch cards for code entry, some more info can be found here.
I made a few changes, so the output is send to a new message queue to make it a bit more readable.
To make a temporary message queue object:
CHGMSGQ MSGQ(QTEMP/MYTEMPQ) DLVRY(*BREAK)
QTEMP is the temp folder of OS/400
The code now looks like this, and yes, the translation of OS/400 stopped around here, after opening the PDM it’s all in English.
And the output
Browsing the web.
Of course, what use is an old computer if it can’t load Hackaday’s retro webpage. Now, the AS/400 is a business server, no fun allowed. So of course, a webbrowser is not available on an AS/400.
Luckily a tutorial exists how to interface with sockets in RPG. As my RPG knowledge is very very non existent, I copy pasted the code, finding that it didn’t work as expected. This turned out because the example code did not send a host: line in the HTTP GET request.
Fixing that gave me a retro.hackaday page, in HTML of course, as the code only requests a website and doesn’t actually have an HTML parser. Good enough for me, as writing an actual web browser in RPG doesn’t sound like a lot of fun to me
The AS/400 machine is definitely weird and cool, with old languages like COBOL and RPG and a very interesting and perhaps modern take on a filesystem in which everything is an object instead of a file. If you are interested in weird computer architectures, it’s possible to get an account for an AS/400 here. Hackaday has published a nice article on how to use it here.
The successor of the AS/400, the IBM i systems, are still being sold today and are compatible with the AS/400, so programs for an AS/400 from the 80s or 90s will run on a modern IBM i system.