rbanffy 2 days ago

It's a real shame there is no IBM i emulation the same way there is Hercules. The very alien nature of its OS, all the way back to the AS/400, can be extremely educational and mind-expanding for people who grew up on Windows and Unix.

  • sillywalk 2 days ago

    If only..

    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.

    [0] https://archive.org/details/insideas4000000solt/

    [1] https://www.pub400.com/

    • skissane a day ago

      Unfortunately with Pub400 free account you only get user level access, so useful for learning the basics of using the system and developing code for it, but not for understanding the internals (topic of this blog post), you need sysadmin level access for that.

      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.

      • jasomill a day ago

        Alternatively, if your goal is non-production exploration of low-level details of the system as described in this article, or even just learning the ropes of IBM i, another option is to buy an old POWER6 or POWER7 system on eBay that's licensed for virtualization and a reasonably recent version of the base IBM i OS, then use it to create disposable evaluation VMs running whatever additional extra-cost software you want to play with (time-limited evaluation copies of most first-party IBM i software are freely downloadable from IBM's Web site).

        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.

        • skissane a day ago

          > 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

    • kragen 2 days ago

      the ia's copy doesn't seem to be freely available, but thanks for the book recommendation! what's your as/400 skill level?

      • sillywalk 2 days ago

        Huh. It was available on an hourly basis when I checked. There's a follow on book called Fortress Rochester: Inside the iSeries, that I had but gave away. It seems to be very expensive.

        My skill level is zero. :) I've read the book and know a bit about the system, but have never used one.

        • blendergeek 2 days ago

          After the IA lost a lawsuit, they can't lend out their books anymore

        • kragen 2 days ago

          available with drm isn't freely available

  • skissane a day ago

    QEMU has POWER emulation and can even (I’ve heard) run AIX, so in principle could be extended to run IBM i too. The problems are instructions which only IBM i uses, for which public documentation is missing or incomplete, and hence QEMU doesn’t emulate-but blog posts like this could help in closing that gap.

    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

    • rbanffy a day ago

      > public documentation is missing

      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.

      • skissane a day ago

        There was more documentation available for System/38. Apparently, System/38 even had source code available on microfiche. (Unclear who if anyone still has it in their possession.)

        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.

        • sillywalk 16 hours ago

          Always look forward to your comments on IBM i, they've always got neat bits of trivia.

          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.

          • skissane 4 hours ago

            > Always look forward to your comments on IBM i, they've always got neat bits of trivia.

            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.

    • shrubble a day ago

      There is a personal/dev license of z/OS called ATDT I think, which you could run legally on Hercules.

      • skissane a day ago

        zPDT (which also goes by a few other names, including ZD&T, RDz-I think they are all essentially the same software just with somewhat different licensing) let you legally run z/OS under emulation. While it is intended to use with IBM’s emulator, maybe you can use Hercules instead-you’d have to check the fine print. But the problem with those products, is they cost approximately US$5000 a year - beyond the means of all but the most dedicated hobbyist

        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

        • kotaKat a day ago

          I wanted to poke around ZD&T Learners Edition but I was slightly annoyed that I couldn't just pick it up and self-explore, IBM wanted me to "prove" myself with challenges or professional experience.

          Hercules it is for me...

elzbardico 2 days ago

IBM may have billions of issues, but I think that the fact the IBM I is still a supported product actively developed is commendable. I doubt that are that many active clients, and while I have no doubt the prices for new equipment, support and licenses are enterprise-level obscene, for enterprise customers running 30 years old critical code on this platform, I bet they are happy IBM is not trigger happy on discontinuing products like Google, or even Microsoft.

  • saltymug76 a day ago

    I can speak with confidence that its hanging on by a thread. IBM has bean counted the development and support staff to the point that entire critical sections of the OS have maybe one, two people working on it. Bugs take months or years to be addressed and security flaws sometimes take just as long to get patched. Not to mention features that were new 20 years ago get the IBM red tape and beuracacy treatment and never get implemented, alienating even more customers.

    • justin66 a day ago

      Yeesh. What a weird area to make deep cuts. They spend all that money developing the hardware, successfully, but it needs the software in order to shine.

      • saltymug76 21 hours ago

        My conspiracy brain thinks part of the reason for the red hat acquisition was to funnel disgruntled IBM i customers into that while bleeding the platform dry.

    • markus_zhang a day ago

      Is the profit that low for IBM to do that? It sounds like it's an empty shell eaten by <>.

      • saltymug76 21 hours ago

        Profits fine, its just not raking in billions and billions like IBM Z is, so IBM i always gets the scraps.

  • bongodongobob 2 days ago

    IBM I is alive and well in large manufacturing organizations. I've worked with companies that have had it but sadly never got to touch or play with it.

rexreed 2 days ago

IBM still wishes we were in the mainframe age where a single vendor had supreme authority and maintenance fees rule the day. You can say that many of today's SaaS vendors have similar sway in their more niche markets but none have the almost complete dominance of their market as did / does in some places IBM.

  • rbanffy 2 days ago

    I believe there are API-level emulation products for AS/400 and its descendants. Any company wishing to migrate off these machines (as off mainframes) can do so, as long as they manage the risks of porting and reimplementing the applications.

    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.

    • skissane a day ago

      > I believe there are API-level emulation products for AS/400 and its descendants.

      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.

      • rbanffy a day ago

        > they can only implement a reasonably common subset

        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.

    • gregw2 2 days ago

      One firm I worked at still has its old “mainframe” running all its cobol apps… but it’s all running on a windows server backed by a sql server database.

  • Spooky23 a day ago

    These servers are like enterprise iPads. We would be better off if solutions like it were vital. Instead we have the Microsoft ecosystem, and the scourge of malware and ransomware.

kragen 2 days ago

i feel like this link would be more useful if the title said "as/400" somewhere in it; 'ibm i' is a cringey artifact of ibm pretending the as/400 is so well-known it can be identified by a single letter, like c

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

  • TristanBall a day ago

    Having worked at an IBM shop, referring to ibm's x, p, i and z series by letter was pretty common, to the point of standard, and same with "our regular ibm customers". ( even if we only dealt with x and p, most folks were at least aware of i and z ) Outside of the IBM ecosystem sure, although once your outside that lots people wouldn't know what an as/400 was if you dropped it on their head so it probably doesn't matter what you call it. ( "expensively fatal" in that specific example, but that's unlikely to be a good marketing term )

    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 )

    • kragen a day ago

      let's ipl from the dasd

edelsohn 2 days ago

Good start a description of IBM i. The article should explain more about capability based systems for it to make more sense.

The ABI described is the same as the AIX ABI. R1 is the stack pointer and R31 is the frame pointer, when needed.

cisrockandroll a day ago

If anybody asks you to work on IBM i or AS400 turn and run.

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.