9 ms·
IBM AS/400: Databases all the way down (2019) [video]
- deleted 4y ago[deleted]
- hsnewman 4y agoYup, in the late 80's, and 90's I worked on several AS/400's. The video doesn't mention that not only is SQL a part of the OS, the hardware (microcoded) actually has instructions for SQL. It's part of the CPU!
- ch_123 4y agoOn the original CISC AS/400 systems, there were two layers of "microcode" - horizontal and vertical. The vertical "microcode" was not really microcode, but was essentially the OS kernel (including the database and the native code generator), mostly implemented in a PL/I dialect. The horizontal microcode was the actual microcode - it implemented the CPU instruction set which the vertical microcode's PL/I code compiled down to. While the horizontal microcode implemented some rather high level things such as processor scheduling, I am almost certain that the database logic was implemented in the vertical microcode layer. Once IBM i was ported to PowerPC, the vertical microcode was mostly rewritten in C++ and became known as the "Licensed Internal Code" and the PPC instruction set essentially replaced the role of the horizontal microcode.
- sillywalk 4y agoThis [0] is a pretty good intro to the AS/400 etc. [0] https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/TCD-SCSS-T.20121208.068/IBM-AS400-technical-introduction.pdf https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/TCD-SC...
- jasomill 4y agoIncidentally, the term "microcode" for the OS kernel originated with the AS/400's predecessor, the System/38, because, as a legacy of '60s-era lawsuits, it was IBM's policy at the time to separate hardware and software sales and development costs. Bundling microcode with hardware, on the other hand, was standard practice. The designers' idea was to build and sell the hardware and software stack as an integrated product, never to implement an operating system or RDBMS "in hardware". For an explanation of this integrated architecture from one of its original designers, see https://archive.org/details/insideas4000000solt/page/75/mode/1up https://archive.org/details/insideas4000000solt/page/75/mode... (registration and check-out required)
- sillywalk 4y agoI've been waiting for that book to be digitized for years.
- skissane 4y ago> Once IBM i was ported to PowerPC, the vertical microcode was mostly rewritten in C++ I heard once from someone who used to work for IBM, that although the most important parts of the “vertical microcode” were rewritten in C++, a lot of less important bits stayed in PL/MP (the PL/I dialect which compiled to the CISC IMPI native instruction set)-they just built a new PL/MP compiler which spat out POWER machine code instead of IMPI machine code-and so lots of PL/MP code is still there. And then there is also PL/MI, which is used for the higher level OS components which run above the “Licensed Internal Code”-it compiles to MI bytecode-and apparently that’s still around too. And still parts of the OS written in Modula 2. But brand new stuff, they prefer more mainstream languages such as C++
- rbanffy 4y agoKind of. Not sure about the CISC-based AS/400, but current ones have bytecode translation (AOT compilation, IIRC) and run on POWER. In hardware terms, a pSeries and an iSeries are the same, with different microcode customizations loaded into the processors. I think it's even possible to run AIX partitions side by side with IBM i ones, if the processors (or TPM's, not sure) have a valid license.
- thequux 4y agoIt is absolutely possible to run AIX and IBM i in separate LPARs on the same machine (as of Power 7, at least), as long as you have the appropriate hardware entitlement to run IBM i.
- ch_123 4y agopSeries and iSeries were consolidated down to "IBM Power Systems" back in 2008. I think they may install different firmware onto the systems, but the differences are more related to licensing than anything specific to the hardware.
- kps 4y agoI think they always did AOT compilation from the AS/400 instruction set to the actual hardware. In the '90s I worked for an external company that did some compiler work on a horizontally-microcoded implementation that didn't get close to shipping. (I don't remember many details, and if I did, I expect they'd still be under NDA.)
- jasomill 4y agoThis is true; at one point, there was even an instruction that deleted the untranslated code ("program template") to save disk space, https://bitsavers.org/pdf/ibm/system38/GA21-9331-1_System_38_Functional_Reference_Manual_Feb81.pdf#page=195 https://bitsavers.org/pdf/ibm/system38/GA21-9331-1_System_38... This instruction is either not present or not documented in the current Machine Interface[1], but I have no idea when or if it was removed. [1] https://www.ibm.com/docs/en/i/7.5?topic=interface-machine-instructions https://www.ibm.com/docs/en/i/7.5?topic=interface-machine-in...
- rbanffy 4y agoI like to joke there are platforms that were so ahead of their time they are still ahead of ours. The AS/400 is one such thing. It concerns me IBM doesn't seem to provide enough entry-level resources (and I believe nobody would do a green field project on IBMi that required a company to invest on the platform unless it already had a sizeable investment on it). For all three of their crown jewels, AIX, Z and i, IBM is doing a terrible job in onboarding new clients. BTW, I've been trying to set up a small AIX box to do some software testing (and not make the mistake of making a Unix app dependent on linuxisms) on IBM cloud and, even when you navigate the confusing UI and metaphors (there is no "give me a POWER10 AIX VM with this many vCPUS, this much memory and this much disk" option), it's failing for me for unfathomable reasons while trying to create a storage volume with the default options. On a side note, I can create a Linux VM running on s390x from the same flow I create x86 ones, but I can't select a z/OS disk image, or a POWER processor. If I want a z/OS machine, I have to go through an entirely different workflow (one I went through, only to never be able to figure out the IP addresses I could ssh to).
- msla 4y agoI don't know why AIX would be compelling. Isn't it just another proprietary Unix?
- rbanffy 4y agoIt all depends on performance per dollar - POWER and AIX, POWER and Linux, x86 and Linux, ARM and Linux, SPARC and Solaris... It's all about what gets you more work done per unit of money until you retire the box. Is it compelling? Not sure - depends on licensing terms, co-location costs, what are you doing, energy costs, AND compute power. As compelling x86 and ARM with Linux seem to be now, I wouldn't rule out other platforms without an assessment based on the workload. Once I managed to bring a couple Itanium boxes we had from retirement because their then humongous caches were perfect fits for our working dataset and, therefore, for that specific workload they were 10x faster than our Xeons.
- msla 4y ago
- LeftHandPath 4y agoI have worked with these extensively - my employer uses one for work, and I have written software both in the greenscreen / ILE languages and in the PASE environment / IFS to accomplish certain tasks (e.g. setting up an intranet site with PHP to present pretty-fied reports of what's in the databases). I think one of my favorite things about it is actually IBM's Data Description Specification (DDS) [0]. You use it for the same reason you'd use a `CREATE TABLE` statement in SQL, but the syntax is much more legible / suited for that purpose, and the file is stored permanently (and used to spool up a "physical file" with the given format, where the data is actually stored). Definitely encourage anyone who is curious about these / esoteric OS's in general to look into them - you can get hands on through IBM's "Cloud for Co-Creation and Enablement" (I believe it's been renamed) or PUB400 [1]. [0]: https://www.ibm.com/docs/en/i/7.3?topic=files-describing-using-data-description-specifications-dds https://www.ibm.com/docs/en/i/7.3?topic=files-describing-usi... [1]: https://www.pub400.com/ https://www.pub400.com/
- debacle 4y agoThe AS/400 OS is one of the most arcane systems I've ever used. Power users can do some incredible things, but I think long-term use results in strange things.
- rbanffy 4y agoTo me, before I met Unisys' MCP, it was the epitome of user-hostile OS. Not because it's particularly difficult to navigate, but that everything is deeply alien (same feeling as z/OS, BTW). Then I met MCP, where everything is both hard to navigate AND deeply alien. ;-) I'm sure Alan Kay is on my side on that one.
- tivert 4y ago> To me, before I met Unisys' MCP, it was the epitome of user-hostile OS. Not because it's particularly difficult to navigate, but that everything is deeply alien (same feeling as z/OS, BTW). Nit, but you're not describing something that's "user-hostile," just something that's unfamiliar to the user that is you. Alien could actually be very good and user-friendly, since a lot of the stuff we're used to frankly sucks, and we're stuck as at an inferior local maxima that's very hard to get out of.
- rbanffy 4y ago> something that's unfamiliar True, but unfamiliar and hard to learn combine to make it forbidding to newcomers. Case in point: https://retrocomputing.stackexchange.com/questions/26398/how-does-one-customize-the-3270-terminal-login-screen-in-vm-370 https://retrocomputing.stackexchange.com/questions/26398/how...
- tivert 4y ago> True, but unfamiliar and hard to learn combine to make it forbidding to newcomers. > Case in point: https://retrocomputing.stackexchange.com/questions/26398/how-does-one-customize-the-3270-terminal-login-screen-in-vm-370 https://retrocomputing.stackexchange.com/questions/26398/how... Though that's MVS, which probably should no be conflated with OS/400. The former is all kinds of trouble because it maintains compatibility with stuff from really old and limited systems, while the latter is quite a bit newer than UNIX so could have alien-advanced "science fiction" features.
- zabzonk 4y agoibm 4381 running vm/cms - best platform ever. beautiful hardware, wonderful operating system, brilliant documentation.
- justanother 4y agoOne of my first ("borrowed") internet accounts was on VM/XA SP around 1991. Yeah you had to hit CTRL-Z to clear your screen, but I was actually amazed at how friendly this machine was (and it would happily spit out pages and pages of helpful documentation), given that it was an "IBM mainframe." It was quite the experience learning to navigate the nascent internet and BITNet of the time on that thing.
- jordemort 4y agoI had a class in community college that was taught on one of these. It was not what I was expecting from a programming class. I had a real bad time of it. Later on, I briefly came to be in possession of an AS/400 that allegedly originally belonged to WKQX Chicago. I held on to it for a couple months but I didn't even have the slightest idea about how to go about hooking it up, let alone the proper cables, so I eventually let it go to another scraphound.
- hlandau 4y agoThe AS/400 is, indeed, a truly weird system. Nowadays it runs as a VM guest on an IBM POWER system. Interestingly, it makes use of hardware tagged memory functionality in the IBM POWER CPUs. You can tinker with this stuff yourself if you have a Talos/Blackbird (or other POWER9) system, as I wrote about previously [1] [2]. [1] https://www.devever.net/~hl/power9tags https://www.devever.net/~hl/power9tags [1] https://www.devever.net/~hl/ppcas https://www.devever.net/~hl/ppcas
- chrisstanchak 4y agopwrdwnsys *immed
- cyberge99 4y agoREQUIRES QSECOFR
- racingmars 4y agoI always feel bad not giving it two minutes just in case! `pwrdwnsys delay(120)` for good luck. ha
- isUserAMonkey 4y agoAbout 25 years ago I was trying to just stop a http server but instead issued ENDTCPSVR (ommitting which type of tcp server), everyone in my department lost their connection and the sysadmin walked over to my desk saying this is why devs should not have any admin access. I did a walk of shame around each desk apologizing profusely.
- robotnikman 4y agoInteresting tidbit I found the other day, apparently there was a collaboration between Nintendo and IBM to promote AS/400, which resulted in the online game "Mario Net Quest" https://www.reddit.com/r/UnreleasedGames/comments/133ukrl/comment/jibbkym/ https://www.reddit.com/r/UnreleasedGames/comments/133ukrl/co...
- sillywalk 4y agoThat seems really a really weird combo, I wonder what the thinking was.
- sillywalk 4y agoI found this so weird I had to learn more, this [0] link has more details and more links. FTA: "AS/400 handled the verification and distribution of every order... [of a N64]" This is a link to an Italian ad for Nintendo+AS/400 Advanced series[1] and the English one [2] [0] https://www.reddit.com/r/lostmedia/comments/12m6yru/found_1997_mario_net_quest_the_first_official/ https://www.reddit.com/r/lostmedia/comments/12m6yru/found_19... [1] https://archive.org/details/lastampa_1997-05-08/page/n3/mode/2up https://archive.org/details/lastampa_1997-05-08/page/n3/mode... [2] https://bashify.io/images/LOIpU7 https://bashify.io/images/LOIpU7
- tannhaeuser 4y agoRPG, though ...
- orthoxerox 4y agoIt's like functional programming in that everything useful an RPG program does is a side effect. A side effect of creating a report, in its case.
- GnarfGnarf 4y agoRPG is an abomination. It's a paradigm of the old plugboard tabulators from the 40's. No indentation. Cryptic op codes. Rigid fixed-column OP1/OP2/operation/result. Assembler without the power. "Repulsive Programming Garbage".
- racingmars 4y agoThe latest version of RPG in current versions of IBM i is fully freeform! It's pretty wild how much they've evolved the language while still calling it "RPG". If you're maintaining old code you'll mostly run into the fixed-column stuff, but for writing new code at least you can make it somewhat readable now.
- artificialLimbs 4y agoDo you still have to add every field in every table you use for your program to work?
- martin1b 4y agoyeah, it's pretty nasty. Free looks pretty java-centric. What's weird is you can in-line RPG. Makes for some crazy looking code.
- zokier 4y agoNot only AS/400 itself is pretty alien, even the terminals are unusual from modern viewpoint; they were not just dumb character grids or text lines, but had some logic for handling forms etc on the terminal side
- PaulHoule 4y agoAS/400 had a terminal that was similar to but not compatible with the 3270 used on the 360 mainframes. Applications like either one are a lot like web applications from 1999, that is, the mainframe draws a screen with a form in it, the user fills out the form, hits a button, and it get submitted. The programming model for transaction managers like CICS on the 360 was similar in some ways to back end web frameworks, they even had clever code generation systems (see “X macros”) for writing serialization/deserialization in assembly language.
- citizenkeen 4y agoWe have 2.5 RPG/AS400 devs in my department keeping our old legacy system alive and trucking. They're great devs and they do good work, but every time I get roped into their side of things I feel lost and confused.
- jefc1111 4y agoI worked with AS/400s. Very fond memories of changing the backup tapes, in particular. I loved the server room! Meanwhile on the software side I was mostly dealing with EDI messages and it was all about critically precise placement of characters (including whitespace). It was ... weird. Nice machines though. The whole company's back office systems for around 300 shops ran on two of them in head office. Ah nostalgia...
- sillywalk 4y agoIBM i (AS/400) is ( I think) the last of the midrange/minicomputers still being developed by the original company. vs OpenVMS/VAX, HP 3000 - MPE/IX, etc.
- unixhero 4y agoA friend of mine got a job as a junior developer at an insurance company whom rely solely on IBMi and RPG programs running on it. It is not dead.
- shreddit 4y agoMy company has one as their main database too, these things just run and run and run
- unixhero 4y ago[He got the job in the year 2022. They were using RPG version 4 on IBM i and are not migrating anywhere. Rather they are hiring!]
- artificialLimbs 4y agoSadly. We're using an i currently. It has sort of locked us in because all of the programs that touch the money are written in ancient RPG. You can't just change a table (which IBM calls files...) when you want to add a field, oh no. You have to change the table AND update EVERY program in RPG that uses that table, because RPG has to know about every field in every file it touches. We are slowly working on migrating out to PHP.
- lmz 4y agoSome would say that's great as you get instant database integrated type checking. Some people actively look for that.
- artificialLimbs 4y agoI don't know, but suspect there are better ways than having to touch all our programs when a table changes.
- crunchyX38921 4y agoThe sad part is that the only reason you have this constraint is because your team/company chose to have it. It has nothing to do with the language or system itself, it's 100% self-inflicted. You can absolutely add new fields to database tables on the system without updating every program - if you architect the software properly. Use embedded sql, explicitly select field names (ie don't do "SELECT *"), and put default values on new fields. I haven't written a new RPG program using the old file-specs in years - all new code has been embedded sql. Not willing to give up SELECT *? Fine - create views on top of the real database tables to do your SELECT * from. Then you can still add new fields to the database tables without changing everything else. Edited to add - if you want to add new fields to a table and not change all your old programs to use SQL, create a new table, transfer your data, and then create a view with the old table name using the same fields. You just have to test a little to make sure your view has the same record format id as the old table. Honestly it's pretty easy once you get the first one done and see how to do it.
- mberning 4y agoMan what a nightmare. I work at a place that still to this day runs on a mainframe with programs mostly written in assembly. It’s the pure essence of the boomer mentality manifest in software. All the people involved got theirs and retired and left a steaming pile of shit for everyone else to deal with.
- martin1b 4y agoLove this!
- bullen 4y agoReminds me of this: https://en.wikipedia.org/wiki/Intel_iAPX_432 https://en.wikipedia.org/wiki/Intel_iAPX_432
- nivethan 4y agoThis is also very much like the pick operating system, currently the biggest multivalue operating systems are UniVerse, UniData and D3. If you want to try them out, look into scarletdme. The multivalue style is a total mind bend at the beginning!
- Mister_Snuggles 4y agoMy first job was supporting an in-house system built in UniVerse. My second job was supporting a commercial ERP that ram on top of UniData. I like the more modern stuff I work with now, but I truly miss the multivalue world some days. Every once in a while I install the UniVerse personal edition and build something for fun. I will definitely check out scarletdme!
- nivethan 4y agoBecause I'm just a straight nerd for BASIC here are some links! A quick guide to getting started with scarletdme: https://nivethan.dev/devlog/scarletdme.html https://nivethan.dev/devlog/scarletdme.html Unfortunately I never ported my editor and shell to scarletdme so this will be UniVerse/UD/D3 specific: An editor like vim: https://github.com/Krowemoh/eva https://github.com/Krowemoh/eva A fish like shell: https://github.com/Krowemoh/nsh https://github.com/Krowemoh/nsh scarletdme in the browser(this will be a 500mb download as it runs debian under v86.js): https://nivethan.dev/projects/v86/scarlet.html https://nivethan.dev/projects/v86/scarlet.html
- Mister_Snuggles 4y agoVery nice - scarletdme in the browser is brilliant! The two things I do to start playing in a new MV environment both worked exactly as I hoped they would: LIST VOC And ED BP BLAH I PRINT "THIS IS A TEST" FIBR The environment feels very normal and reasonable, as far as a multivalue system goes. The only differences I came across are minor, like compiled programs going in BP.OUT instead of BP.O or the debugger being called DEBUG instead of RAID. I definitely need to set this up and seriously play with it! I periodically download a new copy of UniVerse PE to play with, but this is something I could actually do real work in. Believe it or not, I actually like working in ED and/or AE. At one point (back in the UniVerse job), I wrote my own shell. It was basically a REPL that passed whatever you typed to EXEC, except for one nifty trick. The trick was that there were two REPLs in the program - one which worked normally, the other executed within a BEGIN TRANSACTION/END TRANSACTION block and had commands to commit and rollback. Having two REPLs was a concession to get it to even compile because BASIC required that BEGIN TRANSACTION and END TRANSACTION form a block, you couldn't just arbitrarily call those commands. I didn't even bother building a history mechanism, it was literally just a REPL that could work within the context of a transaction. It was incredibly useful.
- nkw 4y agoThat terminal is beautiful. The colors, typeface, and sparse layout make it incredibly readable for me.
- racingmars 4y agoVideo author here -- The terminal emulator is tn5250j [0], configured to use the IBM Plex Mono [1] font. Full-screen it on a 1080p display and it really is quite pleasant! And there's something that just feels "right" about using IBM's font in this case. [0] http://tn5250j.org/ http://tn5250j.org/ [1] https://github.com/IBM/plex https://github.com/IBM/plex
- wglb 4y agoAllstate at one point has about 16,000 of them—one for each field office. Hq would pull up new/changed data every night.
- tourgen 4y ago[dead]
- cduzz 4y agoI wonder what it'd take to make sqlite a filesystem driver for linux. Plop an sqlite blob onto a raw device, interact with it via the "posix filesystem" schema...