Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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/


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.


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.


> 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


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


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.


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


available with drm isn't freely available


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


> 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.


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.


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.


> 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.


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


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


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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: