"How dost I program on thee Web using IBM i, let me count the ways!"
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
People ask me what I do on the iSeries, and I tell them I program mostly for the Web on an AS/400, and they giggle. They don't know what's available until I explain everything – and I mean everything is available – you just need to understand where to look. There's even a surprise or two waiting in the wings.
Browser languages for the Web
How we communicate using a browser is not too different from the old days of programming screens using DDS. The only difference is, there are more choices in how you present the information. I can communicate to my users using a cornucopia of elements, including video, graphics, and mice, I can show them maps, I can use external sources for other items from other companies. I may communicate using XML to external sources using software to push these "packages" and receive information that I can serve to people. There are loads of tools available, and all I need to do is know what's there, and I can sew applications and solutions together. All of this can be communicated using secured communications.
Lets start with the universal language for the web, HTML – we need hyper-text-markup-language to deliver our message. This language, like its ancient cousin has a beginning (the <html>, <head>, <,/head>) middle (<body>, </body>) and end (</html>) that wraps everything together. But, it's not necessary to program with these elements in your page, as nearly all browsers will react, and output your results. The problem is – your results may vary. Unless you adhere to the basic rules of HTML, you may not get the same results between all the browsers. Stick to standard HTML, and you're going to be fine in most cases.
Communicating with Web browsers from IBM i
Now we understand the language of the browsers, but what can you do with the IBM i?
Apache: (a play on words with "a-Patchy") is an essential part of serving at least 85% of the Web. You need this component to "talk" to the browsers hitting you. Getting the latest PTF's is highly recommended, as you will receive security patches frequently. Once you get this down, you need to setup your Web server for serving common gateway interface (CGI) programs, where the back end serves data to the Web dynamically.
RPG: RPG has been on the Web from the very beginning when the AS/400 could serve to a browser. We were using programs as examples to play with, called the CGIDEV libraries, and now it's younger cousin, the CGIDEV2 libraries. Both toolsets were written by the Rochester, Minn., IBM team, but then shown to the world by GB Peroti in Italy. Go to Easy400.net and you'll see the results of some amazing programs written in RPG. These programs are living proof that RPG can do more then we've expected. RPG is using "C" API's (advanced programmer interfaces) to read what we webbies call "standard input" and respond with "standard output" (the basic "rhythm" of the Web). Once downloaded, and observed, your CGI programs could be in RPG?!? Bet you never thought that could happen. But it's been a snappy quick way to talk to the Web for over 10 years.
Net.Data: A basic macro language shipped with every iSeries system, and it has been there for over 10 years. Net.Data isn't the swiftest kid out there, but it'll do its share of quick written applications. Why? It's quick to get started: All of the materials are on the CDs delivered with your OS. You can serve dynamic things, get used to it, but I suggest if you start here, you graduate as quickly as you can to other Web tools. Please keep in mind, the IBM i is one of many OSes that have Net.Data available.
PHP: Yes, PHP! Zend technologies now offers a Zend core, PHP runtime, free download for IBM i.
Other: After this, who could ask for more? Well, Java has been a friend on the i that is very robust, enterprise worthy, and you don't need to break the bank to use it. Tomcat is a functional part of Apache, and is included when you install Apache. Tomcat can be configured to serve JSP pages as long as you don't get too fancy. Once you graduate into tougher software, and need more robust tools, graduating into WebSphere isn't a bad thing. WebSphere is a standard, robust toolset to help you get your jobs on the Web done.
So many Web options for IBM i, so little time
We've only spoken about a fraction of the capabilities of what you can do. iSeries Express also offers tools to open up .Net and VB programming, or ASP pages running from a Windows server isn't out of the question. Within each of these toolsets opens up a HUGE world of communications you can do with other web servers all over the world. You can screen scrape Web sites with an AS/400 if you need to in order to get your job done. Now is this Lazy? No, but it opens up a bag of tricks that you can show to people when they ask what you can do with your "i for business."
ABOUT THE AUTHOR: Andrew Borts is Webmaster at United Auto Insurance Group in North Miami, Fla. He is a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.