On Thu, Apr 11, 2013 at 9:29 AM, Mark S Waterbury
<mark.s.waterbury@xxxxxxxxxxxxx> wrote:
COBOL is a 3GL. RPG is closer to a 4GL ... perhaps a "3 1/2 GL"...
especially when used with the cycle, as originally intended, for
producing reports. With the cycle, lots of stuff is done for you
automatically, so you only have to specify the I-specs (what the input
looks like), the O-specs (what you want the output report to look like),
and perhaps some Calc-specs to do any special computation for each
record. It follows the I-P-O (Input-Process-Output) model.
I find the classification of languages into "generations" quite murky.
There are differing definitions for what each generation entails.
If the standard for higher generations is "looks more like English and
less like code" then COBOL is definitely higher up than RPG. (I'm not
proposing that COBOL is actually higher-level; mainly I'm saying that
this is a silly standard, yet some people do use it as their guide.)
Another standard is a rough estimate of "how much you can accomplish
per line of code" (or per statement or per keyword or other verbosity
metric). Here, RPG is a very strange beast, because of the cycle.
The cycle is extremely high level in the sense that, if your problem
fits neatly into the cycle, then you are going to need to write
extremely little code. Practically none, if the files you are going
to use are perfectly designed for your problem.
But if your problem doesn't fit nicely into the cycle (or you
purposely avoid using it), then RPG quickly descends to about mid-pack
of what most people consider 3GL. Or squarely toward the bottom, if
you're talking RPG II. Yet RPG II still has the cycle, so Wikipedia
lists it as 4GL.
So it's especially confounding to try to categorize RPG. It's
special. It's intimately tied to the native database, in particular
to DB2 on the i (and predecessors). To me, this is both its greatest
strength (because when working on the platform it's designed for, for
the problems it's designed for, nothing else is as good) and its
greatest weakness (way too specialized; only serviceable at best for
general-purpose computing, where it is outclassed by a host of other
languages).
However, that said, COBOL is not impressive as a general-purpose
computing language either. More recently, COBOL has added
object-oriented support, which arguably puts it ahead of RPG for OOP.
Both languages depend heavily on their installed base and their
traditional platforms.
John
As an Amazon Associate we earn from qualifying purchases.