Below MI – IBM i for hackers
silentsignal.github.io
silentsignal.github.io
There's Inside the AS/400[0] available on the Internet Archive, which is a great introduction to the system. Pub400 has free accounts for playing around with. But it's not the same as having your own system.
My skill level is zero. :) I've read the book and know a bit about the system, but have never used one.
You can get a dedicated instance with sysadmin level access if you pay either Pub400, IBM, or a few other vendors. (The smaller instances are not bare metal, they are actually VMs using IBM’s hypervisor.) Whichever way you go you are paying $$$$, because IBM’s licensing for the OS starts at thousands of dollars a year (even for a very low-end system), and gets bigger quickly as the CPU/memory grows.
While these systems won't run anything newer than IBM i V7R2 (POWER6) or V7R3 (POWER7), they're likely to be both faster and cheaper than inexpensive cloud options.
Consider:
In 2017, I paid $1,700 for a POWER6 server (2 CPU cores, 16 GB RAM, half a dozen 137 GB hard drives) with virtualization and IBM i licenses.
The cost estimator on IBM's Power Virtual Server site suggests that their cheapest VM capable of running any version of IBM i they support (0.25 CPU cores, 2 GB RAM, 35 GB storage) costs around $400/month.
RZKH (who run Pub400), the cheapest they charge is 245 EUR/month, which at current exchange rates is about US$263/month. That's 0.05 CPU cores, 2 GB RAM, 100 GB storage), without development tools. Development tools license is additional EUR 79/month (about US$85/month) per concurrent user. Plus they want a minimum 4 month commitment, so it is over US$1000 anyway. At which point, yes your eBay option looks better, unless you really need the latest OS
Another gap is there are firmware APIs that only IBM i uses, so QEMU doesn’t implement those either - and again, public documentation is missing. Of course, people could reverse engineer these calls and implement them. An option (even if only a temporary one) might be to dump the firmware of an actual system and emulate it rather than trying to directly implement the firmware calls. My understanding is (beware my info could be wrong, a lot of this is just my own guesses) is parts of the firmware are actually modules loaded from disk (“LIDs”), and part of the boot process is actually loading these extensions and adding them to the firmware image on the system board.
Of course, there is also the legal issue. But the reality is that most people who run z/OS on Hercules are doing so illegally, and while in theory IBM could sue them, in practice IBM only appears interest in that if you try to turn it into a business, as opposed to just a hobby. Technically it may be possible to legally run z/OS under Hercules, if you have a real mainframe licensed to run z/OS, and then you run Hercules on that mainframe. And similarly, in theory, if you have a POWER box licensed to run IBM i, it might be legal to run it on that box under an open source emulator (if one existed). However, I suspect very few people have ever done that. (And ask your lawyer to check the fine print of IBM’s licensing agreements, because even though in theory they should allow that, it all depends on precisely how they are worded.) So, I doubt technical illegality is really that big an issue in practice.
I think the real problem here is a cultural issue. IBM mainframes historically were really open in exposing their internals, and so lots of customers and vendors developed deep expertise in z/OS internals, even to the point of writing custom kernel modules (nucleus modules to use the proper terminology). So there is a big skill base of people available to work on Hercules. By contrast, IBM i internals have historically been much more hidden from customers, leaving most of the people who know them well either (ex-)IBM employees, or partner vendor (ex-)employees who have signed IBM NDAs - obviously those people worry that working on an open source emulator might risk negative legal attention from IBM. Plus people with mainframe internals skills have always been a numerically larger community than people with IBM i internals skills
At one point there was a “ZD&T Learners Edition”, which was only US$120 a year-much more reasonable. The problem is (1) it was only ever available to people in the US, which excludes many people (including me), (2) I am led to believe it has been discontinued and is no longer available
Hercules it is for me...
This is key. The AS/400 was never as documented as the IBM mainframe lines. I suspect the 360 open documentation was forced upon IBM by the many antitrust lawsuits. The AS/400 and its ancestors were never subject to these pressures.
By the time AS/400 came along, IBM had already become a lot more secretive. But CISC AS/400 was essentially System/38 Version 2.0, so a lot of the System/38 information still applied. It was more a matter of studying the system to work out where the changes/extensions were.
And RISC AS/400 was about as secretive, and less of the old System/38 documentation is applicable. On the other hand, it has a lot in common with AIX and Linux on POWER.
One of the more amusing oddities of AS/400, in my opinion, is some small part of it is descended from OS/2: if you look at the system header files, you will find very vestigial copies of a small number of OS/2 headers – bse.h, bsedos.h, bseerr.h. However, although this basic structure of header files is copied from OS/2, almost all the functions are missing–only two actual OS/2 API functions are present (DosSetRelMaxFH and DosSetFileLocks). My guess is at some point they planned to port more OS/2 APIs to AS/400, but hadn't got very far when they abandoned the whole idea.
I wonder what they were going to do with the OS/2 bits? My two guesses:
I recall IBM had some crazy idea called Workplace OS to somehow unify all their OSs as personalities on top of a microkernel - I think the one from Taligent/Pink.
Or for OS/2 for the x86 servers on PCI cards for AS/400s.
Thanks, nice to know someone out there appreciates them :)
As to the headers, I really don’t know what they were planning.
However, one thing I do know - AS/400 and RS/6000 systems had service processors - a little x86 box which ran its own operating system and was in charge of tasks such as booting (IPL) and hardware diagnostics. Both CISC and RISC AS/400 systems had them. Mainframes had them too; for a long time the mainframe service processors ran OS/2, although more recently they migrated to Linux. I don’t know what AS/400 service processors ran, but maybe some of them did run OS/2.
The ILE layer (like a C runtime library but multilingual rather than C-centric) was (in part) shared between OS/2, OS/400, OS/390 and VM/CMS-although on OS/400 that term also got used to refer to the new version of the MI bytecode that shipped with RISC, which went far beyond the language runtime component shared with other platforms. It is also called CEE, and SAA Language Environment.
How much any of this explains the presence of those OS/2 headers, I don’t know.
> I recall IBM had some crazy idea called Workplace OS to somehow unify all their OSs as personalities on top of a microkernel - I think the one from Taligent/Pink.
It actually briefly shipped as OS/2 PPC Edition, although that was discontinued while still essentially in a beta state. It was a port of OS/2 2.x to run on top of Mach. It could also run DOS and Windows 3.x apps using CPU emulation (possibly it might have done so natively if they ever ported it to x86.) IIRC, some internal work was done on an AIX personality although it never shipped; Mach always had a POSIX personality, but based on BSD not SysV, so making it compatible with AIX for RS/6000 was in principle feasible even if they never finished it. IBM actually did briefly ship an AIX based on Mach, AIX/ESA, for IBM mainframes, which was based on OSF/1. (Albeit, historically AIX was just a brand, so not sure how compatible AIX/ESA was with the AIX we all know and love.)
From what I’ve heard, although the long-term plan was to port OS/400 to run on top of Workplace OS too, no actual work on it happened before the whole idea was cancelled. And I don’t know if there was any ever any plan to port OS/390 to run on top of Workplace OS, but I doubt that would have ever happened, even in an alternative timeline in which Workplace OS actually succeeded and ended up swallowing all three of OS/2, AIX and OS/400.
> Or for OS/2 for the x86 servers on PCI cards for AS/400s.
Yes, although I believe that while OS/2 was supported (at least at one point), NetWare and Windows NT were far more common.
These lines are still popular because they offer something a rack of Dells can't - a nicely packaged solution of extremely reliable (and powerful, no pun intended in the case of i) hardware and software, exquisitely refined over many decades.
There are, and it isn’t a new thing - California Software Products came out with BABY/400 in the early 90s, to support porting RPG apps from AS/400 to DOS or OS/2-and Windows and NetWare versions were soon added as well.
But the problem all these solutions have - IBM i has so many gazillions of features, many of them legacy (sometimes with multiple different ways to do the same thing, just for historical reasons), none of these packages can implement it all, they can only implement a reasonably common subset. And if you are really lucky, your app only uses that subset, and it all just works. And if you are a bit less lucky, it only uses one or two extra bits that are easily replaced, and the rework required is modest. And if you are really unlucky - and the bigger your app and the more technical debt it has, the more likely it is - the bits missing may be so significant, using one of these solutions might not be viable.
Looks like an excellent opportunity for an open-source project to step in. Would need a lot of AS/400 and IBM i hobbyists to cover everything.
the as/400 design is pretty interesting, just because it's so different from currently popular systems. if you're familiar with unix and you study vms or windows 11, you won't learn that much, because vms and unix are almost identical. os/400 is a much weirder beast, and its design doesn't just have disadvantages relative to more widely used system architectures, but also advantages—even if, in the end, the disadvantages turned out to be more important
https://www.youtube.com/watch?v=5pY6Xxptp9A
for a non-technical audience, but still manages to satisfy
I used to get irritated by IBM's naming, and to an extent still do, but it's more things like calling the motherboard the planar and things like that. A lot of the heat went out of that when it occurred to me their usage probably predates "motherboard", but even then keeping it still feels like an attempt to differentiate their stuff to justify higher prices. ( which sometimes is justified, depending on generation and timing, but that'd be true regardless of the nomenclature )
The ABI described is the same as the AIX ABI. R1 is the stack pointer and R31 is the frame pointer, when needed.
The system is cool. But the majority of jobs are underpaid in comparison to the open source stacks. And they wonder why there is a lack of new blood.
There are many articles out there claiming COBOL/Mainframe/AS400/“ancient” programmers are retiring and the orgs want to pay you big bucks to replace them. For the most part they are just parlor tricks to try and get a cost savings on new grads.