Getting an IBM AS/400 Midrange computer on the internet

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 source
s’)
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:
CRTMSGQ MSGQ(QTEMP/MYTEMPQ)
CHGMSGQ MSGQ(QTEMP/MYTEMPQ) DLVRY(*B
REAK)
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

Conclusion

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.


32 Comments

  • Reply A.B. Polak |

    Came across your post on hackster.io qsecofr is the root user on os/400. Maybe it’s password is the same. Also 8times 1 is used often. If those are not working then resetting tru DST is the only way forward.

  • Reply A.B. Polak |

    Read your post via hackster.io. The qsecofr user is the “root” on os/400. Maybe it’s password is the same. Sometimes 8x 1 “11111111” is used. If that fails only IPL to DST will be an option to reset qsecofr. But also there you need password to continue….

  • Reply Joris |

    This is funny, Bizibit was this IT-company in my hometown (Belgium). Now there’s a Chinese restaurant instead.

  • Reply calvin |

    you might want to try this:
    DSPSYSVAL SYSVAL(QLANGID)

    it will show you the current system value for language id. remember it! then you can try:
    CHGSYSVAL SYSVAL(QLANGID) VALUE(ENU)
    it should change the system value’s language id to english. tread carefully with command WRKSYSVAL

  • Reply calvin |

    you may be able to install python on your iseries:
    http://www.iseriespython.com/

    if you want to change your networking setup you can use WRKTCPSTS or GO CMDTCP

    GO CMD— where — is command will bring up the list of commands related whatever you typed. GO CMDSPLF will bring up spool file related commands. GO CMDCPY will list all the copy commands.

    all the commands belong to the CL language. you can create CL programs for all sorts of things, just as you can write bash or csh programs in unix. you can find all the ibm documentation online. here is a recent collection of CL info from IBM. https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rbam6/clpro.htm

    -calvin

    ps. the website throws errors when posting comments.

    • Reply riktw |

      Huh, cool. Though from what I see it requires V5R3, which is a bit newer then my machine runs but I’ll have a look at it.

    • Reply Peter Smythe |

      Absolutely agree Pierre Clouthier: I experienced this awful language of RPG in the 90s – all those indicators (especially on older code) – it was absolute rubbish. I think RPG started off simply with the inbuilt control loop, running through sequential files. Then they tried to make it into a higher-level language, and it became ridiculous.

  • Reply VK2FVAX |

    Hi. Drop me an email. It’d be nice to compare notes. I have a 9406-170 and a -250. I’ve been re-installing and trying to get my head around these things for a while.

    Loved your blog post. :)

    Best Wishes,
    Al.

  • Reply Jan Krejcarek |

    Hi, thanks for the article and the pictures. I used to work with one of these machines (well somewhat larger in size) at the beginning of my career in the middle of 90s. The bank I worked for used it to run a core banking system (and they still do using the IBM i Series). This thing never crashed and there was no need to reboot it once in a while to make things run smoothly like we did with Windows servers. Wonderful system.

  • Reply Olivier Cahagne |

    Just curious, what’s the underlying hardware: IBM Power CPU ? Is there a BIOS at all ?

      • Reply user |

        it does come with licensed programs called ILE C/C++ compiler… good system. using it for years.

  • Reply Mike Neuliep |

    Yes! You can run linux on these hardware platforms…but it’ll be slow. CentOS and Suse have been ported over.

  • Reply Rob Dixon |

    I have an old AS/400 model 150 which hasn’t been powered up in many years and is gathering dust. However, I am sure that it will still work even though it is over 20 years old. AS/400s and their successors are very robust. The current version IBM i which runs on IBM Power Systems, is almost certainly the most reliable and secure, hacker proof server in the world today.

    I am sorry that Pierre didn’t like RPG. It is a wonderful language that has allowed me to develop advanced collaborative systems using a new type of database – the AI based ERROS Connectionist Database, created with RPG. – see http://www.erros.co.uk/ERROS_Connectionist_Database.pdf

    ERROS allows incremental application development of the most advanced internet based applications, which are defined in the database rather than in program code. The data structure of the user data is also defined in the Connectionist Database and the database structure can be changed whilst the database is in use. New applications are mostly created without any new program code, so you don’t have to use RPG or C – only your own natural language – English, French, German, Italian, etc. Earlier versions of ERROS were developed in part on my AS/400 150. ERROS generates HTML and JavaScript on the fly – thanks to RPG

    Vk2FVAX

    I also have a model 170 – not in use and a model 250 – still in daily use

  • Reply Michael |

    Oh, there was a lot of games, mostly inherited from the /34 and /36. Every support guy had a floppy with such nasty things as a full illustrated kamasutra, demonstrated by two matchstick figures on the command line.

  • Reply brian Gyles |

    default password if you plug only one screen in and power it back up is
    user QSECOFR
    Password QSECOFR

    i got a nice AS/400 / iSeries at home and 2 dumb terminals
    I also was programming them looking after them for about 20 years its backwards compatible with the System 36 (RPG II) but RPG400 and RPGILE are the native ones for the as400

So, what do you think ?