× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

But, for some reason, on the System/38 and early AS/400, many RPG III or RPG/400 programmers religiously avoided the cycle, perhaps due to perceived poor performance on early underpowered IMPI machines, or perhaps just because they wanted to be "in control" of exactly what their program was doing. In any case, I recall many times seeing RPG programs written using "full procedural" style, but when you examine the code, what you find was that the programmer had "re-invented the wheel" and "hand-coded" the cycle in RPG. =-O This approach reduces RPG to a 3GL, "throwing out the baby with the bath water" ... IMHO.

If you look at how display files work, especially with subfiles, with indicators, etc., this is also very "non-procedural" in nature. From the point of view of the programmer, you just write some records to the subfile, then you write the subfile control record, and the whole subfile screen is displayed, and, depending on how you coded your DDS, the system takes care of all the paging (roll up and roll down), etc. for you. This is one aspect of OS/400 applications development that is often hard to grasp for typical 3GL programmers coming from other platforms, I think in large part because IBM failed to adequately explain that "display files are declarative (non-proedural) in nature." This is also why it is difficult to create a web (browser) interface that exactly mimics all of the built-in behaviors of display files.

With ILE RPG IV, especially /free form, it is less of a 4GL and more of a 3GL than the old RPG, though you can still use the cycle and some other features, (like "matched records", etc.). The number of lines of code to do any given task in RPG vs. COBOL will usually favor RPG, because COBOL is much more verbose.

Mark

> On 4/11/2013 9:13 AM, Michael Ryan wrote:
COBOL is a fine language. RPG is a fine language. There are nuances, and
certainly syntax differences, but they're about the same from a programmer
perspective (IMO). I haven't written COBOL in a number of years, but I can
remember writing RPG all day and COBOL at an extra gig at night. I was
equally productive I think.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.