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.

BOB COZZI

Bob Cozzi is a programmer/consultant, writer/author, and software developer. His popular RPG xTools add-on subprocedure library for RPG IV is fast becoming a standard with RPG developers. His book The Modern RPG Language has been the most widely used RPG programming book for more than a decade. He, along with others, speaks at and produces the highly popular RPG World conference for RPG programmers.


MC Press books written by Robert Cozzi available now on the MC Press Bookstore.

RPG TnT RPG TnT
Get this jam-packed resource of quick, easy-to-implement RPG tips!
List Price $65.00

Now On Sale

The Modern RPG IV Language The Modern RPG IV Language
Cozzi on everything RPG! What more could you want?
List Price $99.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: