Ask Not What You Can Do for RPG but What RPG Can Do for You!

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

How long did it take before your shop started using embedded SQL? How long did it take before your shop started using /free syntax in RPG IV? How long did it take before your shop started using subprocedures? How long did it take before your shop started using service programs?

Did you know that you can use embedded SQL in /free syntax on V5R3 and later? V5R3 requires PTFs SI23384, SI25532, and SI25763. No PTFs are required if you're on V5R4, however.

Did you know that you could store all your subprocedures in one or more (preferably more) service programs? That way, when you modify them, you simply issue an UPDSRVPGM to one object (the service program), and then all programs that utilize that service program start using the new code.

RPG IV is a very robust language and can do a lot easily, once you learn its features. As with COBOL, Java, C, Visual Basic, and C++, someone who knows RPG IV well can do powerful things. Those who advocate other languages are often not as well-versed in RPG IV as they should be, but sometimes it is easier to do things in one of those other languages than it is in RPG IV; sending email using Java's SendMail function comes to mind.

But at the end of the day, it's not RPG IV that's at fault. It's often management's knowledge of RPG IV that is lacking. I recently read a requirements document that stated something like this:

We have our invoicing data on the AS/400 [yes, it said "AS/400" even though they're running a large System i5] and our Web site is on the PC server. We want our customers to be able to view and print their invoices. Today, invoices are printed on the AS/400 printer.

This company's solution is to send a request from the PC server to the AS/400 via ODBC and then have the old invoice print program cloned and modified so that it outputs data in XML or CSV format onto the IFS. Then, that data is sent via communications over to the Web server and a program is written there that reads the XML or CSV data and produces an HTML or PDF version of the invoice for the customer.

Sound familiar? That's too bad. I couldn't think of a more unreliable and convoluted way to design a system. How about this instead:

Start the Apache server on the System i. Then, create an HTML page that requests the necessary information from the customer to retrieve the invoice information. Next, using the invoice data, generate an HTML or PDF file directly into the Web browser of the requester. How simple is that? By using CGI or one of those popular "SP" (server pages/smart pages) third-party packages, this can be done in probably less than a day. How long would it take to coordinate the PC Web people, the network people, and the AS/400 staff for the other solution?

It continues to surprise me that instead of taking a day to learn how to do Web stuff with RPG IV, CGI, and the System i, companies will spend tens of thousands or hundreds of thousands of dollars installing hardware they don't need and hiring staff to manage that hardware (again, staff they don't really need). Then, they blame the System i because "it's old and can't do this new stuff." In fact, the real problem is that the decision-makers—and often their contact in the System i IT department—are out of touch with reality.

Certainly, in a small company that has fewer than 15 employees, the System i is simply too expensive compared to a $3000 PC server and bootlegged server software. But that window closed a little last month when IBM introduced the Model 515. That's still a bit pricey compared to similarly configured PC servers, but when you include paying for server users, the database, and the other software, the PC server is actually more costly than the System i.

The only real problem now is that you don't need those .NET or network people who really don't know how to do anything except reboot the server, reinstall software, and fabricate myths about the System i. After all, these people don't know jack about IT to begin with, so why would they know anything about a real computer?


Bob Cozzi is author of the best-selling The Modern RPG IV Language, Fourth Edition as well as RPG TNT: 101 Dynamite Tips 'n Techniques with RPG IV and is host of the i5 Podcast Network, which provides free video and audio podcasts to the i5 community. You can also see him in person at RPG World in May 2007.

BLOG COMMENTS POWERED BY DISQUS