April 05, 2004
What's wrong with RPG

It's been quite a while since I've been an RPG programmer. Now I'm back with it for a month or two, and I can't say that I'm liking it much. I've become accustomed to loads of nice things that I no longer have available.

Firstly, there's the language itself. RPG is ugly, inexpressive and fiddly. I think that these are somewhat related - to quote ESR, Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.

A few examples: Opening a file in anything but the most standard of ways involves fiddling with an unholy mix of F, D and I specs, all of which are column oriented records, and all of which need to be located in different parts of the source deck. The C specs don't have to be column oriented, but I've yet to see the new free format RPG used in anger. Using the old style column oriented C specs, if your expression gets too long, it'll end up running into the comment column, and will be ignored. If you're unlucky, the compiler won't notice, and your expression will compile with a bit missing. This gets picked up in testing, of course, but there ain't no jUnit for RPG.

There's a narrow range of activities for which RPG works reasonably well, and it must be said, it's very well integrated with the iSeries's built in database. The iSeries is pretty much an accountant's machine, and you can build the applications that you want with RPG, I suppose. But all the fiddling leaves you with appalling productivity.

Then there's the standard library. Or, to be more specific, the complete and utter lack of one. Java has a huge standard library, and Python's standard library is either even larger or much smaller, depending upon whether you are talking about functionality, or lines of code. ;-) And if I can't find what I'm looking for in the standard libraries, well, Google and PyPI are my friends, and there's almost always something to download. RPG, on the other hand, has no standard library at all, and there's little stuff on the 'net. RPG does support software components, just about, but there isn't a community making stuff available. So, every project reinvents its string and date handling, for example.

Lastly, there's the development environment. The site that I'm at, just like every other iSeries site that I'm aware of, use the SEU source editor, which is out of the Ark. This is particularly irritating, because there's a fantastic Eclipse-based replacement, WDSc. This comes as part of the same WDS bundle as SEU does, so if you have one, you have the other - but no one uses it!

In short, if you catch me whinging about Java again, just slap me.

Posted to iSeries by Simon Brunning at April 05, 2004 01:54 PM
Comments

I've been slinging a bit of RPG (and Synon) lately and I'm dismayed at the cruftiness I used to consider acceptable.
Most of the time I end up downloading tab-delimited files from the 400 and hacking up some quick python scripts to either do the analysis or write out some SQL to fix the data in question.
I _really_ want to try AS400 python interpreter but its not my machine so I'm afraid to ask. We do have a test partition tho and we should be getting a new bigger box in a few months that we will be able to partition on the fly, so maybe there is a future for me, python and the ISeries.

Posted by: j on April 5, 2004 09:01 PM

Heh... Last year I was writing J2EE for iSeries. It was all fine until we had to bring an application up or down - then things we had to find somebody who knew something about AS/400 and Things Got Hard ;)

It sounds like your toolset has been tightly defined, so I shan't mention that you could run Jython on a JVM on the AS/400, because that would be teasing.

Posted by: Alan Green on April 6, 2004 07:03 AM

Jython[1] is one good option for running Python on an iSeries; combined with JTOpen[2], it gives you good access to the system. *But*, Java is dog slow on the iSeries, I've found, so Per Gummedal's CPython port[3] is also well worth a look.

But I have no such option here. I'm just a hired gun, and RPG is what the client wants. :-(

[1] http://www.jython.org/
[2] http://www-124.ibm.com/developerworks/oss/jt400/
[3] http://www.iseriespython.com/

Posted by: Simon Brunning on April 6, 2004 09:06 AM

I'm not that keen on WDSc. Don't you find it strange that when you prompt a command it shows the command options on the green screen and not in WDSc.

We have a few programmers that use it here, I'm not sure if they use it for RPG (all ILE here, even CL!).

Posted by: Mark Boyce on April 6, 2004 11:35 PM

YOu do not know RPG so better not Comment on something that you do not know.

Posted by: alex on August 12, 2005 06:25 AM

I've forgotten more RPG than most '400 programmers know, Alex.

Posted by: Simon Brunning on August 12, 2005 08:50 AM

Ha ha ha!
I'm on the net to try and see if there's a free RPG editor to run on my PC.
Having moved (or tried to move) from iSeries or RPG, I find myself contracting to do iSeries development.
I sympathize with you.
Although I still think the iSeries is a great machine. If only IBM did what Microsoft is doing now for .NET (with all the Express editions and the wealth of tools available to simplify developers' lives).

Posted by: charlit0 on October 20, 2007 06:16 AM

The iSeries is doomed to die a slow and agonizing death. IBM has always sucked at software. It's just too bad they wont take something like Python, put some resources behind it and see what happens. But no, even REXX is dead on OS400. Face it, JAVA is IBMs future, unfortunately for them. JAVA is today's COBOL compared to dynamic languages like Python.

Posted by: Paul on November 20, 2007 12:43 AM

It's pretty amazing whenever I read someone who makes a comment like the iSeries being old technology or is doomed to die which to me indicate just how unfamiliar that individual is with the iSeries (AS400/System i5) or IBM's direction for the machine.

Not to mention the fact that for those who believe IBM is limited to JAVA, the iSeries has compilers for COBOL, RPG, C, JAVA, and just about any other language software applications are developed in, including Python! www.iseriespython.com

It just always amazes me the comments people make about things they have no clue about. Simply amazing.

Posted by: Jonathan on November 29, 2007 04:55 PM

Hey, Jonathan. I agree that a lot of people criticize the '400 on grounds of ignorance, but I'm not one of them. I worked on the '400 for years, and I'm well aware of its strengths.

But a lot of people defend the '400 on grounds of ignorance, too, blind to its weaknesses.

And seriously, dude, if you want people to take your opinion as to the current state of IT seriously, do sort out your web site. I've not seen anything so it's-1996-and-I've-just-discovered-JavaScript in *years*.

Posted by: Simon on November 29, 2007 05:17 PM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?