× 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.




On 23/06/2008, at 11:53 PM, David FOXWELL wrote:

I've read several times lately in articles that, in the author's opinion, RPG is the best language for business logic.

For a programmer who has very little knowledge of the world outside RPG and CL ( like me for instance ) that is difficult to question.

Could those of you who KNOW RPG is best explain very simply, why?

Strictly speaking RPG is not the "best" because that's a subjective appellation. In order to decide "best" you first have to know what is being compared (i.e., RPG vs. ???).

RPG is no better or worse than COBOL (another business language). Both support fixed-decimal data types, both support date, time, and timestamp data types (and include intrinsic or built-in functions for operating on them), both support sequential and keyed access to files. Both have good structured coding support.

RPG is more terse (or perhaps you prefer concise) than COBOL--whether that is an advantage or not is purely subjective. COBOL gives direct access to record buffers so can show a performance improvement in I/O intensive applications (although RPG has similar support if you read into a data structure). RPG's procedure support is better than COBOL's nested program idea. COBOL has a wider range of mathematical functions *IN* the language than RPG. COBOL is portable while (modern) RPG is not. However, for business programming they are both equally good.

If you were coding on a non-IBM-midrange platform RPG wouldn't even enter the discussion. While there are business advantages to running your business on an IBM-Midrange system the existence of RPG on that platform is hardly sufficient reason to make the choice.

When compared to C, C++, and Java then RPG has a number of advantages for business programming primarily being fixed-decimal support, date support, and fixed-length variable support (less of an issue with Java but a primary source of problems in C). However, since COBOL also has these features it is an equally valid alternative for business programming.

For systems-level programming C is fine.

For OO I still reckon you can't beat Smalltalk.

For scripting I prefer Rexx.

My "best" language is PL/1. It has most of the features of RPG and COBOL plus the low-level stuff that C is good at. Pity the IBM- midrange variant wasn't popular.

So, no such thing as "best" except within a constrained context.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.