IceKings
IceKings was a school project for the Procedural Programming course in 2004: the website of an ice hockey club, with news, players, results and sponsors. The course was taught in RPG on an AS/400, and a previous group had once done something with HTML and CGI on it, so I set myself the challenge of building a complete website with the AS/400 as its back end, RPG as the language and DB/400 as the database.
PHP on one machine, RPG on the other. The site was going to be PHP, but the school’s AS/400 couldn’t run PHP, so it ran on a separate Windows 2000 server with IIS instead. That left the hard part: getting the two machines to talk.
Getting them to talk. DB/400 supports stored procedures, so the first plan was to call the RPG programs through them. That failed twice: first I couldn’t connect at all, which turned out to be permissions, and even with those fixed there was no way to call a stored procedure from PHP. So I built my own bridge. A PHP class took the name of an RPG program and its parameters and turned them into a query string, which it called on the AS/400 over CGI. There, a program parsed the query string and called the right RPG program, and whatever that program returned went back to the PHP object, which processed it for the website.
The result. A fully working PHP website on a Windows server, with an AS/400 back end running RPG against DB/400, and a lot learned along the way about RPG’s column-based syntax and its moods around capitalisation. More in the post Ancient Technologies: RPG & AS/400.
Technologies: PHP, RPG, AS/400, DB/400, CGI, IIS, Windows 2000, HTML, CSS, Photoshop.
You May Also Like

How This Blog Is Served
The machinery behind the words you're reading: Hugo, an unprivileged nginx, a strict CSP, and a deploy script.

Keeping the Old Addresses Alive
Nobody migrates email in one day. Fetchmail, a receive-only alias domain, and permanent redirects bridge the old world into the new one.

Making Roundcube Not Look Like 2012
Webmail is the face of the platform, so it got a Gmail-shaped skin, real calendar and contacts integration, and some money spent on polish.





